installed. You should run this with \fB\-\-pretend\fR
first to make sure the result is what you expect.
.TP
+.BR "\-\-exclude " ATOMS
+A comma 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.
+.TP
.BR "\-\-fail\-clean[=n]"
Clean up temporary files after a build failure. This is
particularly useful if you have \fBPORTAGE_TMPDIR\fR on
self._required_set_names = set(["world"])
+ self.excluded_pkgs = InternalPackageSet()
+ for x in myopts.get("--exclude", []):
+ 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)
+
+
class _dynamic_depgraph_config(object):
def __init__(self, depgraph, myparams, allow_backtracking,
mreasons.append('backtracking: %s' % \
', '.join(sorted(backtrack_reasons)))
backtrack_mask = True
+ if not mreasons and self._frozen_config.excluded_pkgs.findAtomForPackage(pkg):
+ mreasons = ["exclude option"]
if mreasons:
masked_pkg_instances.add(pkg)
if atom.use:
# The package has been masked by the backtracking logic
continue
+ if not pkg.installed and \
+ self._frozen_config.excluded_pkgs.findAtomForPackage(pkg):
+ continue
+
if dont_miss_updates:
higher_version_rejected = False
for rejected in packages_with_invalid_use_config:
for line in wrap(desc, desc_width):
print(desc_indent + line)
print()
+ print(" " + green("--exclude") + " " + turquoise("ATOMS"))
+ desc = "A comma 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."
+ for line in wrap(desc, desc_width):
+ print(desc_indent + line)
+ print()
print(" "+green("--fail-clean[=n]"))
desc = "Clean up temporary files after a build failure. This is " + \
"particularly useful if you have PORTAGE_TMPDIR on " + \
"choices" : ("True", "n")
},
+ "--exclude": {
+ "help" :"A comma 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.",
+
+ "action" : "store"
+ },
+
"--fail-clean": {
"help" : "clean temp files after build failure",
"type" : "choice",
else:
myoptions.complete_graph = None
+ if myoptions.exclude:
+ exclude = []
+ bad_atoms = []
+ for x in myoptions.exclude.split(","):
+ bad_atom = False
+ try:
+ atom = portage.dep.Atom(x)
+ except portage.exception.InvalidAtom:
+ try:
+ atom = portage.dep.Atom("null/"+x)
+ except portage.exception.InvalidAtom:
+ bad_atom = True
+
+ if bad_atom:
+ bad_atoms.append(x)
+ else:
+ if atom.operator or atom.blocker or atom.use:
+ bad_atoms.append(x)
+ else:
+ exclude.append(atom)
+
+ if bad_atoms and not silent:
+ writemsg("!!! Invalid Atom(s) in --exclude parameter: '%s' (only package names and slot atoms allowed)\n" % \
+ (",".join(bad_atoms),), noiselevel=-1)
+
+ myoptions.exclude = exclude
+
if myoptions.fail_clean == "True":
myoptions.fail_clean = True