1 |
commit: c2efbad8402a7e8904c7353a9930e87ea128b962 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 30 17:04:11 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 30 17:04:11 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c2efbad8 |
7 |
|
8 |
depgraph: tweak virtual transition code |
9 |
|
10 |
This fixes a false --binpkg-respect-use warning that's triggered by |
11 |
erroneous USE/IUSE comparison between the new-style virtual and an |
12 |
old-style virtual match. |
13 |
|
14 |
--- |
15 |
pym/_emerge/depgraph.py | 10 +++++----- |
16 |
1 files changed, 5 insertions(+), 5 deletions(-) |
17 |
|
18 |
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
19 |
index 9638ce9..ad04551 100644 |
20 |
--- a/pym/_emerge/depgraph.py |
21 |
+++ b/pym/_emerge/depgraph.py |
22 |
@@ -3689,6 +3689,8 @@ class depgraph(object): |
23 |
if not isinstance(atom, portage.dep.Atom): |
24 |
atom = portage.dep.Atom(atom) |
25 |
atom_cp = atom.cp |
26 |
+ have_new_virt = atom_cp.startswith("virtual/") and \ |
27 |
+ self._have_new_virt(root, atom_cp) |
28 |
atom_set = InternalPackageSet(initial_atoms=(atom,), allow_repo=True) |
29 |
existing_node = None |
30 |
myeb = None |
31 |
@@ -3736,6 +3738,9 @@ class depgraph(object): |
32 |
# USE configuration. |
33 |
for pkg in self._iter_match_pkgs(root_config, pkg_type, atom.without_use, |
34 |
onlydeps=onlydeps): |
35 |
+ if pkg.cp != atom_cp and have_new_virt: |
36 |
+ # pull in a new-style virtual instead |
37 |
+ continue |
38 |
if pkg in self._dynamic_config._runtime_pkg_mask: |
39 |
# The package has been masked by the backtracking logic |
40 |
continue |
41 |
@@ -3954,11 +3959,6 @@ class depgraph(object): |
42 |
if not e_pkg: |
43 |
break |
44 |
|
45 |
- if e_pkg.cp != atom_cp and \ |
46 |
- self._have_new_virt(root, atom_cp): |
47 |
- # pull in a new-style virtual instead |
48 |
- break |
49 |
- |
50 |
# Use PackageSet.findAtomForPackage() |
51 |
# for PROVIDE support. |
52 |
if atom_set.findAtomForPackage(e_pkg, modified_use=self._pkg_use_enabled(e_pkg)): |