From: Zac Medico Date: Mon, 11 Feb 2013 02:24:51 +0000 (-0800) Subject: _slot_change_probe: handle masks X-Git-Tag: v2.2.0_alpha162~13 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e64dd7eb67c3a2fc7aa6c6e42d6df156d1553c8f;p=portage.git _slot_change_probe: handle masks --- diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 34a4604c8..c3560105c 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -1045,15 +1045,27 @@ class depgraph(object): return None root_config = self._frozen_config.roots[dep.root] + matches = [] try: - unbuilt_child = self._pkg(dep.child.cpv, "ebuild", - root_config, myrepo=dep.child.repo) + matches.append(self._pkg(dep.child.cpv, "ebuild", + root_config, myrepo=dep.child.repo)) except PackageNotFound: - for unbuilt_child in self._iter_match_pkgs(root_config, - "ebuild", Atom("=%s" % (dep.child.cpv,))): - break - else: - return None + pass + + for unbuilt_child in chain(matches, + self._iter_match_pkgs(root_config, "ebuild", + Atom("=%s" % (dep.child.cpv,)))): + if unbuilt_child in self._dynamic_config._runtime_pkg_mask: + continue + if self._frozen_config.excluded_pkgs.findAtomForPackage( + unbuilt_child, + modified_use=self._pkg_use_enabled(unbuilt_child)): + continue + if not self._pkg_visibility_check(unbuilt_child): + continue + break + else: + return None if unbuilt_child.slot == dep.child.slot and \ unbuilt_child.sub_slot == dep.child.sub_slot: