summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-09-14 11:18:21 +0000
committerZac Medico <zmedico@gentoo.org>2009-09-14 11:18:21 +0000
commite091f7fbc06a8ada27465e4b37ae6d586ac4ab30 (patch)
treea81a11a832a4d5c327d2c534de1842e5d0299dc2
parentc1e83203c56cbb4a9e154c9d8428844a7424db59 (diff)
downloadportage-e091f7fbc06a8ada27465e4b37ae6d586ac4ab30.tar.gz
portage-e091f7fbc06a8ada27465e4b37ae6d586ac4ab30.tar.bz2
portage-e091f7fbc06a8ada27465e4b37ae6d586ac4ab30.zip
When _expand_new_virtuals() is called by repoman, skip expansion of new-style
virtuals. svn path=/main/trunk/; revision=14270
-rw-r--r--pym/portage/__init__.py22
1 files changed, 17 insertions, 5 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index d9e74f22e..011df6724 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -7515,6 +7515,23 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
if parent_cpv is not None:
atom_graph.add(x, parent_cpv)
continue
+
+ if repoman:
+ if portdb.cp_list(x.cp):
+ newsplit.append(x)
+ else:
+ # TODO: Add PROVIDE check for repoman.
+ a = []
+ for y in mychoices:
+ a.append(portage.dep.Atom(x.replace(mykey, str(y.cp), 1)))
+ if not a:
+ newsplit.append(x)
+ elif len(a) == 1:
+ newsplit.append(a[0])
+ else:
+ newsplit.append(['||'] + a)
+ continue
+
match_atom = x
pkgs = []
matches = portdb.match(match_atom)
@@ -7579,11 +7596,6 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
atom_graph.add(virt_atom, parent_cpv)
# Plain old-style virtuals. New-style virtuals are preferred.
if not pkgs:
- if repoman:
- # TODO: Add PROVIDE check for repoman.
- for y in mychoices:
- a.append(portage.dep.Atom(x.replace(mykey, str(y.cp), 1)))
- else:
for y in mychoices:
new_atom = portage.dep.Atom(
x.replace(mykey, dep_getkey(y), 1))