self.excluded_pkgs = InternalPackageSet()
for x in ' '.join(myopts.get("--exclude", [])).split():
try:
- x = Atom(x)
+ x = Atom(x, allow_wildcard=True)
except portage.exception.InvalidAtom:
- x = Atom("null/" + x)
- cat = x.cp.split("/")[0]
- if cat == "null":
- pkgname = x.cp.split("/")[1]
- for myroot in trees:
- for tree in ("porttree", "bintree"):
- if tree == "bintree" and not "--usepkg" in myopts:
- continue
- db = self.trees[myroot][tree].dbapi
- for cat in db.categories:
- if db.cp_list(cat + "/" + pkgname):
- atom = portage.dep.Atom(str(x).replace("null", cat))
- self.excluded_pkgs.add(atom)
- else:
- self.excluded_pkgs.add(x)
+ x = Atom("*/" + x, allow_wildcard=True)
+ self.excluded_pkgs.add(x)
class _dynamic_depgraph_config(object):
for x in ' '.join(myoptions.exclude).split():
bad_atom = False
try:
- atom = portage.dep.Atom(x)
+ atom = portage.dep.Atom(x, allow_wildcard=True)
except portage.exception.InvalidAtom:
try:
- atom = portage.dep.Atom("null/"+x)
+ atom = portage.dep.Atom("*/"+x, allow_wildcard=True)
except portage.exception.InvalidAtom:
bad_atom = True
exclude.append(atom)
if bad_atoms and not silent:
- parser.error("Invalid Atom(s) in --exclude parameter: '%s' (only package names and slot atoms allowed)\n" % \
+ parser.error("Invalid Atom(s) in --exclude parameter: '%s' (only package names and slot atoms (with widlcards) allowed)\n" % \
(",".join(bad_atoms),))
if myoptions.fail_clean == "True":