Strange problem with portmaster

Matthias Andree mandree at FreeBSD.org
Wed Aug 7 16:40:50 UTC 2013


Am 07.08.2013 18:06, schrieb Paul Schmehl:
> I recently upgraded all the ports on a server, so I decided to run
> portmaster -r perl to make sure all the perl ports were up to date.
> 
> I used portmaster -rfd perl and got the following error:
> /var/db/pkg/fd does not exist
> 
> I googled a bit and found nothing.  Then I thought, that's strange, fd
> was the second and third commands.  So I ran:
> portmaster -r -f -d perl and I got /var/db/pkg/f does not exist
> 
> Then I tried portmaster -rf -d perl and got /var/db/pkg/d does not exist
> 
> I finally just ran portmaster -r perl, which worked of course.
> 
> Apparently the -r switch doesn't want to see anything after except the
> port that's being recursively built?  I didn't try portmaster -fd -r
> perl. Maybe I should have?

Paul,

you should have tried that: The -r switch has a mandatory argument and
is not just a bare switch, so be sure to keep the r right before the
"perl" argument when coalescing options.

"portmaster -dfr perl" should work, as should
"portmaster -d -fr perl", or "portmaster -fr perl -d"

$ grep getopt /usr/local/sbin/portmaster | grep -v ^#
while getopts 'BCDFGHKLPRabde:fghilm:nop:r:stvwx:y'
COMMAND_LINE_ARGUMENT ; do

meaning that e, m, p, r, x options take a mandatory argument.

Just standard getopts business shared by most POSIX shell utilities.

HTH
Matthias


More information about the freebsd-ports mailing list