From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 22E35139694 for ; Thu, 16 Mar 2017 23:25:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E71B021C06B; Thu, 16 Mar 2017 23:25:15 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B4EAC21C06B for ; Thu, 16 Mar 2017 23:25:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 73ADE33BEFC for ; Thu, 16 Mar 2017 23:25:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D85BE6AB4 for ; Thu, 16 Mar 2017 23:25:12 +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: <1489706464.e5d638cf855656afab141da8d7b4d7f66cad3450.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: e5d638cf855656afab141da8d7b4d7f66cad3450 X-VCS-Branch: master Date: Thu, 16 Mar 2017 23:25:12 +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: fa497a23-1bb0-4b9f-a10b-aeafb0281f04 X-Archives-Hash: 4ba5fc01a3ce76dd435bb00626deac73 commit: e5d638cf855656afab141da8d7b4d7f66cad3450 Author: Zac Medico gentoo org> AuthorDate: Thu Mar 16 20:48:48 2017 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Mar 16 23:21:04 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e5d638cf depgraph: fix missed atom_not_selected initialization (bug 612846) Fix the _slot_operator_update_probe method to ensure that the atom_not_selected variable is always properly initialized. This problem prevented the method from identifying slot operator rebuild candidates, leading to dependency conflicts and/or missed updates. For example, this may have triggered the missed llvm update reported in bug 611742, since these dependencies from the mesa-17.0.1 ebuild are capable of triggering the problem, when atom_not_selected is not properly set to True for the second atom: || ( sys-devel/llvm:4[${MULTILIB_USEDEP}] >=sys-devel/llvm-3.6.0:0[${MULTILIB_USEDEP}] ) X-Gentoo-bug: 612846 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=612846 Acked-by: Brian Dolbec gentoo.org> pym/_emerge/depgraph.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index ad94fb70f..f4145d05f 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -1895,7 +1895,9 @@ class depgraph(object): all_candidate_pkgs = None for atom in atoms: - atom_not_selected = False + # The _select_atoms_probe method is expensive, so initialization + # of this variable is only performed on demand. + atom_not_selected = None if not atom.package: unevaluated_atom = None @@ -1977,8 +1979,8 @@ class depgraph(object): if selected_atoms is None: selected_atoms = self._select_atoms_probe( dep.child.root, replacement_parent) - if unevaluated_atom not in selected_atoms: - atom_not_selected = True + atom_not_selected = unevaluated_atom not in selected_atoms + if atom_not_selected: break if not insignificant and \ @@ -1989,6 +1991,15 @@ class depgraph(object): (pkg, unevaluated_atom or atom)) candidate_pkgs.append(pkg) + # When unevaluated_atom is None, it means that atom is + # an soname atom which is unconditionally selected, and + # _select_atoms_probe is not applicable. + if atom_not_selected is None and unevaluated_atom is not None: + if selected_atoms is None: + selected_atoms = self._select_atoms_probe( + dep.child.root, replacement_parent) + atom_not_selected = unevaluated_atom not in selected_atoms + if atom_not_selected: continue replacement_candidates.append(candidate_pkg_atoms)