Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Aug 2013 18:40:48 +0200
From:      Matthias Andree <mandree@FreeBSD.org>
To:        freebsd-ports@freebsd.org
Subject:   Re: Strange problem with portmaster
Message-ID:  <52027890.4070502@FreeBSD.org>
In-Reply-To: <E993C53BFE5A683E7BBEA6F1@localhost>
References:  <E993C53BFE5A683E7BBEA6F1@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52027890.4070502>