summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-05-05 00:23:34 -0700
committerZac Medico <zmedico@gentoo.org>2010-05-05 00:23:34 -0700
commit55edc9751fd580c73d5430800de6f4c34e8730e8 (patch)
tree52fc9929e3a565b7a3c24b7ea17ab514259491cb
parentc9d7a86960aba51c820ec1bb11142531764f7730 (diff)
downloadportage-55edc9751fd580c73d5430800de6f4c34e8730e8.tar.gz
portage-55edc9751fd580c73d5430800de6f4c34e8730e8.tar.bz2
portage-55edc9751fd580c73d5430800de6f4c34e8730e8.zip
Make myopts["--exclude"] a plain string in order to avoid issues with mtimedb
unpickling.
-rw-r--r--pym/_emerge/depgraph.py6
-rw-r--r--pym/_emerge/main.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 3164e339e..79fa508a1 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -94,7 +94,11 @@ class _frozen_depgraph_config(object):
self._required_set_names = set(["world"])
self.excluded_pkgs = InternalPackageSet()
- for x in myopts.get("--exclude", []):
+ for x in myopts.get("--exclude", "").split():
+ try:
+ x = Atom(x)
+ except portage.exception.InvalidAtom:
+ x = Atom("null/" + x)
cat = x.cp.split("/")[0]
if cat == "null":
pkgname = x.cp.split("/")[1]
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 66c6e037a..9f7a20da5 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -757,8 +757,6 @@ def parse_opts(tmpcmdline, silent=False):
parser.error("Invalid Atom(s) in --exclude parameter: '%s' (only package names and slot atoms allowed)\n" % \
(",".join(bad_atoms),))
- myoptions.exclude = exclude
-
if myoptions.fail_clean == "True":
myoptions.fail_clean = True