diff options
author | Zac Medico <zmedico@gentoo.org> | 2015-12-08 22:28:59 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2015-12-09 08:46:53 -0800 |
commit | 1d9df5eec15e883b38879bebdac7294cb51756ad (patch) | |
tree | 550106bef40a31458b13ae4fd8817fa39add8143 | |
parent | portage.package.ebuild.config.config.__init__(): Skip some warnings for Porta... (diff) | |
download | portage-1d9df5eec15e883b38879bebdac7294cb51756ad.tar.gz portage-1d9df5eec15e883b38879bebdac7294cb51756ad.tar.bz2 portage-1d9df5eec15e883b38879bebdac7294cb51756ad.zip |
depgraph._too_deep: fix logic when deep is True (bug 566024)
Since commit cc8724b80ec7da713baed3d3a88c0bb99fc368b7, the _too_deep
method erroneously returned True when deep was True. When deep is True
and depth is an int, the method is intended to return False, therefore
fix it to do so. This fixes the dep.want_update assignment from commit
cc8724b80ec7 to behave correctly, which solves bug 566024 because it
corrects behavior of the _slot_operator_trigger_reinstalls method.
Fixes: cc8724b80ec7 ("depgraph._want_update_pkg: handle _UNREACHABLE_DEPTH (bug 554928)")
X-Gentoo-Bug: 566024
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=566024
Acked-by: Alexander Berntsen <bernalex@gentoo.org>
-rw-r--r-- | pym/_emerge/depgraph.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index fa83ae8ce..2169b0000 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -5407,8 +5407,14 @@ class depgraph(object): @return: True if the package is deeper than the max allowed depth """ deep = self._dynamic_config.myparams.get("deep", 0) - return depth is self._UNREACHABLE_DEPTH or ( - isinstance(deep, int) and isinstance(depth, int) and depth > deep) + if depth is self._UNREACHABLE_DEPTH: + return True + elif deep is True: + return False + else: + # All non-integer cases are handled above, + # so both values must be int type. + return depth > deep def _depth_increment(self, depth, n=1): """ |