diff options
author | Marius Mauch <genone@gentoo.org> | 2007-07-09 05:53:30 +0000 |
---|---|---|
committer | Marius Mauch <genone@gentoo.org> | 2007-07-09 05:53:30 +0000 |
commit | 047bc3829bd609e06d5cdce5e7b0056d2bd4f4bd (patch) | |
tree | 6921dd1a6762905ea05c2fc9eccb95593790427d | |
parent | 6a419a479a306952e28414ed5e0d4300df0acab0 (diff) | |
download | portage-047bc3829bd609e06d5cdce5e7b0056d2bd4f4bd.tar.gz portage-047bc3829bd609e06d5cdce5e7b0056d2bd4f4bd.tar.bz2 portage-047bc3829bd609e06d5cdce5e7b0056d2bd4f4bd.zip |
simplify logic a bit
svn path=/main/trunk/; revision=7206
-rw-r--r-- | pym/emerge/__init__.py | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index 477164e88..aa69b0da2 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -342,28 +342,20 @@ def create_depgraph_params(myopts, myaction): # recurse: go into the dependencies # deep: go into the dependencies of already merged packages # empty: pretend nothing is merged - myparams = ["recurse"] - add=[] - sub=[] + myparams = set(["recurse"]) if "--update" in myopts or \ "--newuse" in myopts or \ "--reinstall" in myopts or \ "--noreplace" in myopts or \ myaction in ("system", "world"): - add.extend(["selective"]) + myparams.add("selective") if "--emptytree" in myopts: - add.extend(["empty"]) - sub.extend(["selective"]) + myparams.add("empty") + myparams.remove("selective") if "--nodeps" in myopts: - sub.extend(["recurse"]) + myparams.remove("recurse") if "--deep" in myopts: - add.extend(["deep"]) - for x in add: - if (x not in myparams) and (x not in sub): - myparams.append(x) - for x in sub: - if x in myparams: - myparams.remove(x) + myparams.add("deep") return myparams # search functionality |