Solved [Solved] Reinstall ports with portmaster: filename too long

Hello,

After using freebsd-update upgrade -r 10.0-RELEASE I tried to reinstall all ports with following command : portmaster -afd but after a while it spits out an error message :
Code:
/usr/local/sbin/portmaster : File name too long
and it gets stuck. I am using zsh. Trying it before with /bin/sh, I got the same type of error:
Code:
Arguments list too long.

Any idea???

Regards.
 
Re: Reinstalling all ports with portmaster : file name too

That's the slow way of rebuilding all ports, but anyway: how many ports do you have installed?
 
Re: Reinstalling all ports with portmaster : file name too

The fast way is shown at the end of portmaster(8). Come to think of it, there may not be as much of a difference now with pkg(8), because the database queries are probably a lot faster.

That procedure may have the same problem with a command line length limit. But with the list of origin ports created in the first step, you can manually install each of those and it will bring in all the rest as dependencies.
 
Re: Reinstalling all ports with portmaster : file name too

I think, by fast way you mean this
Using portmaster to do a complete reinstallation of all your ports:
at the end of
Code:
man portmaster.
I tried but at the end invoking portmaster `cat ~/installed-port-list` it complains that /var/db/pkg is empty !
Is there a way to get rid of the error I mention in my message ?

Thanks
 
Re: Reinstalling all ports with portmaster : file name too

wblock@ said:
Are you using the old package tools or pkg(8)?

I don't think you can use Portmaster with pkg(8) as per your man portmaster suggestion:

Code:
===>>> Package installation support cannot be used with pkgng yet,
       it will be disabled
 
Re: Reinstalling all ports with portmaster : file name too

nanotek said:
wblock@ said:
Are you using the old package tools or pkg(8)?

I don't think you can use Portmaster with pkg(8) as per your man portmaster suggestion:

Code:
===>>> Package installation support cannot be used with pkgng yet,
       it will be disabled

Yes you can, the message means only that installation of build time dependencies from packages is not supported when using PKGNG packages. You also can not use it for a simple installation tool for the PKGNG packages because that's covered by pkg install.
 
Re: Reinstalling all ports with portmaster : file name too

wblock@ said:
Are you using the old package tools or pkg(8)?

Yes, I use the new format, that was suggested after the reinstallation of portmaster.
What solutions do I have now ? I used the same command portmaster -afdR three weeks ago, had the same number of installed ports, and got no error message.

Regards
 
Re: Reinstalling all ports with portmaster : file name too

wblock@ said:
I suspect that the /var/db/pkg complaint is because you have to install ports-mgmt/pkg first.

Thanks I will give it a try when I am back from work and have some spare time. I mean the method in ten points at the end of portmaster()
Hope portmaster is not giving me the same error.

Regards
 
Re: Reinstalling all ports with portmaster : file name too

I tried the method in ten points described at the end of man portmaster. I reinstalled ports-mgmt/portmaster and ports-mgmt/pkg. It does no more complaint about an empty /var/db/pkg but I have two problems with the file generated with portmaster --list-origins > ~/installed-port-list.

1. Trying as recommended portmaster `cat ~/installed-port-list` I got following error message :
>>> is not installed
I had to edit the file and delete the first line
>>> Sorting the ports by category
. This should not happen.

2. In the file only 72 ports are listed, I had 1229 ports installed !!!

I can get access to a three days old copy of the partition where FreeBSD 10 is installed, I can boot on it but how to get a text list of all installed ports ?

Regards
 
Re: Reinstalling all ports with portmaster : file name too

Please stop running commands for a bit.

portmaster --list-origins lists the "origin" ports, the main ports. All the others are pulled in as dependencies of those.

Have you done a complete conversion to pkg(8)? On my desktop with 822 ports, there are 246 origin ports.

Remember that after switching to pkg(8), none of the pkg_* programs should be used any more. And of course the first step to switch is running pkg2ng. Did you do that? Does pkg info give the same list of 1229 ports as the old pkg_info?
 
Re: Reinstalling all ports with portmaster : file name too

portmaster --list-origins lists the "origin" ports, the main ports. All the others are pulled in as dependencies of those.
Yes, after careful reading of the man page, that's the conclusion I arrived to.

To answer your question: Yes I made the switch to ports-mgmt/pkg and ran first pkg2ng , as to pkg info I will try it this evening after work.


Regards
 
Re: Reinstalling all ports with portmaster : file name too

A short answer ro close the topic. The method described in portmaster(8) works . I am building all my ports again after the last system update.

Thanks
 
Back
Top