From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id BC25C1384B4 for ; Wed, 9 Dec 2015 16:52:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0F5E7E0876; Wed, 9 Dec 2015 16:51:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A6A34E0876 for ; Wed, 9 Dec 2015 16:51:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5A79733FA71 for ; Wed, 9 Dec 2015 16:51:56 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DF6BEC6A for ; Wed, 9 Dec 2015 16:51:53 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1449679613.1d9df5eec15e883b38879bebdac7294cb51756ad.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/depgraph.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 1d9df5eec15e883b38879bebdac7294cb51756ad X-VCS-Branch: master Date: Wed, 9 Dec 2015 16:51:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: d1820585-e135-48df-ac1c-78f0e04a1a06 X-Archives-Hash: 787e921e4b71ad794ab168e1b4f6cc06 commit: 1d9df5eec15e883b38879bebdac7294cb51756ad Author: Zac Medico gentoo org> AuthorDate: Wed Dec 9 06:28:59 2015 +0000 Commit: Zac Medico gentoo org> CommitDate: Wed Dec 9 16:46:53 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=1d9df5ee 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 gentoo.org> pym/_emerge/depgraph.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index fa83ae8..2169b00 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): """