From 55edc9751fd580c73d5430800de6f4c34e8730e8 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 5 May 2010 00:23:34 -0700 Subject: [PATCH] Make myopts["--exclude"] a plain string in order to avoid issues with mtimedb unpickling. --- pym/_emerge/depgraph.py | 6 +++++- pym/_emerge/main.py | 2 -- 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 -- 2.26.2