Portmaster -e globs not working?

I'm new to portmaster and I'm trying the remove all php5 packages using:

Code:
portmaster -e 'php5-*'

But it's not working, portmaster replies:

Code:
===>>> No such directory/port: /var/db/pkg/php5-*
===>>> Aborting update

But when I do:

Code:
echo /var/db/pkg/php5-* | xargs -n 1

there are tons of them!

Am I just-not-getting-it or is this a bug?
 
Hmm, thanks, but no-go:

Code:
# portmaster -e php5-\*

===>>> No such directory/port: /var/db/pkg/php5-*
===>>> Aborting update

:S
 
You can try [cmd=]pkg_delete -f php5-\*[/cmd] followed by [cmd=]portmaster -s[/cmd]

Does the same thing, by and large. Looks like a bug, yes. Not going to try and replicate it, as I'm quite attached to my current PHP installation ;)
 
It's definitely some kind of weird bug:
Code:
# portmaster -n -e p\*

===>>> No such directory/port: /var/db/pkg/pics
===>>> Aborting update

# portmaster -n -e "p\*"

===>>> No such directory/port: /var/db/pkg/p\*
===>>> Aborting update

# portmaster -n -e "p*"

===>>> No such directory/port: /var/db/pkg/pics
===>>> Aborting update
It appears to be grabbing the first entry matching "p*" in my CWD, even when escaped from the shell.

Also:
Code:
# portmaster -n -e /var/db/pkg/p*

===>>> No such directory/port: /var/db/pkg//var/db/pkg/p5-CDDB_get-2.27,1
===>>> Aborting update

# portmaster -n -e /var/db/pkg/p\*

===>>> No such directory/port: /var/db/pkg//var/db/pkg/p5-CDDB_get-2.27,1
===>>> Aborting update


It does appear to work correctly if your CWD is /var/db/pkg/
 
Couple of problems here. :) First, -e does not take multiple ports. I've just updated the svn version to clarify this, and the update will be in 3.2 which will be coming out ASAP. Second, the term "glob" in the portmaster documents refers to a glob pattern, which does not need a * appended on the command line. In fact, portmaster will strip those off internally.

If you really want to remove all ports that start with php the easiest way to do that using sh/bash/etc. would be something like:

Code:
cd /var/db/pkg
for port in php*; do
portmaster -e $port
done


hope this helps,

Doug
 
Back
Top