# emerge --exclude dev-java/* dev-lang/ruby dev-ruby/* --deep --update --newuse --changed-use --with-bdeps=y @world !!! 'dev-ruby/*' is not a valid package atom. !!! Please check ebuild(5) for full details. and indeed : # tail /var/log/emerge.log 1466239830: Started emerge on: Jun 18, 2016 10:50:29 1466239830: *** emerge --exclude=dev-java/* --verbose-conflicts --reinstall=changed-use --quiet-build=y --color=n --deep --nospinner --newuse --tree --with-bdeps=y --update dev-lang/ruby dev-ruby/* @world 1466239830: *** terminating.
fun fact: it works for just 2 args with just one '*' : --exclude dev-ruby/* dev-lang/ruby
PEBKAC. How is Portage supposed to figure out where parameters to --exclude end and packages begin? You need to use --exclude multiple times to exclude multiple atoms.
(In reply to Michał Górny from comment #2) > PEBKAC. How is Portage supposed to figure out where parameters to --exclude > end and packages begin? You need to use --exclude multiple times to exclude > multiple atoms. Yes, but that's not what is says on the tin: --exclude ATOMS A space separated list of package names or slot atoms. Emerge won't install any ebuild or binary package that matches any of the given package atoms.
Then: emerge --exclude 'foo bar baz' Quoting is significant.
(In reply to Michał Górny from comment #4) much better IMO is to repeat that option for each ATOM, especially in scripts otherwise somebody lands eventually in the quoting hell IMO the man page of emerge should reflect this pitfall
(In reply to Toralf Förster from comment #5) > IMO the man page of emerge should reflect this pitfall How do you propose it should reflect it? We're not going to explain on every single option that takes a space separated list of packages that you need to quote it; but I'm open to other ideas.
(In reply to Alexander Berntsen from comment #6) Hhm, I'd like to have a comma-separated list of atoms. Would avoid all kind of hassles and can be simply splited within python, or ?
(In reply to Toralf Förster from comment #7) > (In reply to Alexander Berntsen from comment #6) > Hhm, I'd like to have a comma-separated list of atoms. I'm not confident enough about the different kinds of shells people might invoke emerge from to know if commas are a good idea. Nor do I know what that would actually add compared to simply quoting them, which is the normal behaviour of every shell I know of, that most shell users are aware of.
*** Bug 609990 has been marked as a duplicate of this bug. ***
Either make it clearer in man page. --exclude "ATOMS" A quoted list of space separated package na... or make portage less dumb and make it end the exclude list on @ - or eol it won't kill anyone that <emerge --exclude pck1 pck2 pck3> will endup with an error that no package was given while <emerge pck3 --exclude pck1 pck2> will endup good. it will allow emerge --exclude this that @world or emerge --exclude this that --oneshot openssh or force exclude as last argument with end of list to eol.