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 4307613877A for ; Sat, 30 Aug 2014 07:40:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2BEF6E0D98; Sat, 30 Aug 2014 07:40:24 +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 A8A97E0D97 for ; Sat, 30 Aug 2014 07:40:23 +0000 (UTC) Received: from [192.168.11.9] (ip68-101-112-47.oc.oc.cox.net [68.101.112.47]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id 492B233FFC8; Sat, 30 Aug 2014 07:40:22 +0000 (UTC) Message-ID: <54017FE4.4000203@gentoo.org> Date: Sat, 30 Aug 2014 00:40:20 -0700 From: Zac Medico User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-portage-dev@lists.gentoo.org CC: SebastianLuther@gmx.de, arfrever.fta@gmail.com Subject: [gentoo-portage-dev] [PATCH] _slot_operator_update_probe: fix bug #520856 X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: 6662ebe7-b0c6-4480-b1ca-7dfc58042066 X-Archives-Hash: 985b07fee1248072275dd3bf82d02f9e This fixes the check_reverse_dependencies function (inside the depgraph _slot_operator_update_probe method) to account for irrelevant parent atoms from parents that need to be rebuilt or have been involved in unsolved slot conflicts. X-Gentoo-Bug: 520856 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=520856 --- pym/_emerge/depgraph.py | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 845a43a..d6cd24d 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -1567,14 +1567,40 @@ class depgraph(object): selective = "selective" in self._dynamic_config.myparams want_downgrade = None - def check_reverse_dependencies(existing_pkg, candidate_pkg): + def check_reverse_dependencies(existing_pkg, candidate_pkg, + replacement_parent=None): """ Check if candidate_pkg satisfies all of existing_pkg's non- slot operator parents. """ + built_slot_operator_parents = set() for parent, atom in self._dynamic_config._parent_atoms.get(existing_pkg, []): - if atom.slot_operator == "=" and getattr(parent, "built", False): - continue + if atom.slot_operator_built: + built_slot_operator_parents.add(parent) + + for parent, atom in self._dynamic_config._parent_atoms.get(existing_pkg, []): + if isinstance(parent, Package): + if parent in built_slot_operator_parents: + # This parent may need to be rebuilt, so its + # dependencies aren't necessarily relevant. + continue + + if replacement_parent is not None and \ + (replacement_parent.slot_atom == parent.slot_atom + or replacement_parent.cpv == parent.cpv): + # This parent is irrelevant because we intend to + # replace it with replacement_parent. + continue + + if any(pkg is not parent and + (pkg.slot_atom == parent.slot_atom or + pkg.cpv == parent.cpv) for pkg in + self._dynamic_config._package_tracker.match( + parent.root, Atom(parent.cp))): + # This parent may need to be eliminated due to a + # slot conflict, so its dependencies aren't + # necessarily relevant. + continue atom_set = InternalPackageSet(initial_atoms=(atom,), allow_repo=True) @@ -1693,7 +1719,8 @@ class depgraph(object): continue if not insignificant and \ - check_reverse_dependencies(dep.child, pkg): + check_reverse_dependencies(dep.child, pkg, + replacement_parent=replacement_parent): candidate_pkg_atoms.append((pkg, unevaluated_atom)) candidate_pkgs.append(pkg) -- 1.8.1.5