From: Zac Medico Date: Wed, 11 Jul 2007 04:58:10 +0000 (-0000) Subject: Simplify logic mapping of options to depgraph params (trunk r7206 and r7230). X-Git-Tag: v2.1.3~62 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ee6dea0f2a5bce56db31f4ddd84b09ad97fcf71e;p=portage.git Simplify logic mapping of options to depgraph params (trunk r7206 and r7230). svn path=/main/branches/2.1.2/; revision=7231 --- diff --git a/bin/emerge b/bin/emerge index 78da49f34..557d33fcd 100755 --- a/bin/emerge +++ b/bin/emerge @@ -343,28 +343,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.discard("selective") if "--nodeps" in myopts: - sub.extend(["recurse"]) + myparams.discard("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