pkg install from ports list

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

pkg install from ports list

Beeblebrox
If one has a list of packages which one wants to install, one can do:
pkg install `cat /path-to/pkg.list`
And the packages listed in that file will get installed.

Unfortunately, I have a list of ports (which I fed to poudriere for the build). Now I have a list of ports which I would like to install but I must convert it to a package list. Removing the section preceding the slash and generating a new file of the trailing section is not difficult, but it does not solve the problem.

Many packages do not have the same name as the trailing section. For example devel/qmake4 package is named qt4-qmake-4*, and thus pkg install qmake4 does not work.

How to install the list of ports then? I don't see a way to feed a list of port names into pkg install (which would be very nice actually). If portmaster were to support pkgng, "portmaster -PP `cat ~/installed-port-list` " would have done it, but I see no replacement for it. portupgrade does not work either and actually seems broken. Is there a work-around?
 
Regards.
FreeBSD-11-current_amd64_root-on-zfs_RadeonKMS
Reply | Threaded
Open this post in threaded view
|

Re: pkg install from ports list

Beeblebrox
>>Oli Hauer wrote:
>> Using the $cat/$port notation has always worked.

Yes, but it seems not to work in "list file" situations

>> Not tested, but I suspect this will work.
>> pkg install `awk '{printf "%s ", $1}' $path/to/poudriere/portlist`

SAMPLE OUTPUT:
e17-module-winlist-ng-20130510 already installed
e17-module-winselector-20130510 already installed
e17-modules-20130510 already installed
pkg: No packages matching 'x11-wm/enlightenment' available in the repositories

My pkg repo shows: pkg/All/enlightenment-0.17.5,2.txz

# pkg install x11-wm/enlightenment
Updating repository catalogue
......stuff.....
enlightenment-0.17.5,2 already installed

I get the "No packages matching 'foo/bar' available in the repositories" message for most of what is in the list, even when I do:
# pkg install -r myrepo `awk '{printf "%s ", $1}' $path/to/poudriere/portlist`

Thanks and Regards.
FreeBSD-11-current_amd64_root-on-zfs_RadeonKMS
Reply | Threaded
Open this post in threaded view
|

Re: pkg install from ports list

Beeblebrox
@ Oli: The code you posted is most likely correct, as I get the same error if I do it manually from the terminal:
# pkg install aaa/port1 bbb/port2 ccc/port3 etc..
I am slicing the list into smaller pieces and running the code you posted on the smaller slices. It works, as long as the list does not contain a port with some kind of issue. The issues appear to be:
* Dependent port is one of conflicting ports (py27-setuptools for example)
* If the list already contains the dependent port (Not always, seems to loop on its self for some however)

Regards.
FreeBSD-11-current_amd64_root-on-zfs_RadeonKMS