diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-02-13 22:05:52 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-02-13 23:48:17 -0800 |
commit | 5c72bae0306384a0f4e6f3fb67b5d59dba0f6b46 (patch) | |
tree | 133c7e589a763f9a7a1edcc7a2cfae57aa41c15e | |
parent | aec8506a120c4350e20fe015b242f781f80870c2 (diff) | |
download | portage-5c72bae0306384a0f4e6f3fb67b5d59dba0f6b46.tar.gz portage-5c72bae0306384a0f4e6f3fb67b5d59dba0f6b46.tar.bz2 portage-5c72bae0306384a0f4e6f3fb67b5d59dba0f6b46.zip |
depgraph: remove redundant "empty" param checks
Since commit 878f166c5a06b0ab6c5a34dd658c878cc7605fe7, empty implies
deep = True, so these checks are redundant.
-rw-r--r-- | pym/_emerge/depgraph.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 160299b31..23f45e2e6 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -675,9 +675,8 @@ class depgraph(object): debug = "--debug" in self._frozen_config.myopts buildpkgonly = "--buildpkgonly" in self._frozen_config.myopts nodeps = "--nodeps" in self._frozen_config.myopts - empty = "empty" in self._dynamic_config.myparams deep = self._dynamic_config.myparams.get("deep", 0) - recurse = empty or deep is True or dep.depth <= deep + recurse = deep is True or dep.depth <= deep if dep.blocker: if not buildpkgonly and \ not nodeps and \ @@ -1056,8 +1055,7 @@ class depgraph(object): depth = 0 pkg.depth = depth deep = self._dynamic_config.myparams.get("deep", 0) - empty = "empty" in self._dynamic_config.myparams - recurse = empty or deep is True or depth + 1 <= deep + recurse = deep is True or depth + 1 <= deep dep_stack = self._dynamic_config._dep_stack if "recurse" not in self._dynamic_config.myparams: return 1 @@ -1116,8 +1114,7 @@ class depgraph(object): if not pkg.built and \ "--buildpkgonly" in self._frozen_config.myopts and \ - "deep" not in self._dynamic_config.myparams and \ - "empty" not in self._dynamic_config.myparams: + "deep" not in self._dynamic_config.myparams: edepend["RDEPEND"] = "" edepend["PDEPEND"] = "" @@ -3615,7 +3612,7 @@ class depgraph(object): depgraph_sets.sets.update(required_sets[root]) if "remove" not in self._dynamic_config.myparams and \ root == self._frozen_config.target_root and \ - (already_deep or "empty" in self._dynamic_config.myparams): + already_deep: remaining_args.difference_update(depgraph_sets.sets) if not remaining_args and \ not self._dynamic_config._ignored_deps and \ |