summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-06-30 23:03:34 +0000
committerZac Medico <zmedico@gentoo.org>2009-06-30 23:03:34 +0000
commit03031782022dc12fceebc00830f0dfc7aaebee61 (patch)
treea68d8a248c61fa4ef7612831d06fd93907c9055d
parent3cd307d36e3fe71470eeca7f95cc6b288c16eb11 (diff)
downloadportage-03031782022dc12fceebc00830f0dfc7aaebee61.tar.gz
portage-03031782022dc12fceebc00830f0dfc7aaebee61.tar.bz2
portage-03031782022dc12fceebc00830f0dfc7aaebee61.zip
Fix depgraph._resolve to do old-style virtual matches against package.provided
when there is no other choice. svn path=/main/trunk/; revision=13749
-rw-r--r--pym/_emerge/depgraph.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index aeebda020..ee02417d9 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -1358,6 +1358,7 @@ class depgraph(object):
myroot = self._frozen_config.target_root
pkgsettings = self._frozen_config.pkgsettings[myroot]
pprovideddict = pkgsettings.pprovideddict
+ virtuals = pkgsettings.getvirtuals()
for arg in self._dynamic_config._initial_arg_list:
for atom in arg.set:
self._frozen_config.spinner.update()
@@ -1383,6 +1384,22 @@ class depgraph(object):
pkg, existing_node = self._select_package(
myroot, atom, onlydeps=onlydeps)
if not pkg:
+ pprovided_match = False
+ for virt_choice in virtuals.get(atom.cp, []):
+ expanded_atom = portage.dep.Atom(
+ atom.replace(atom.cp,
+ portage.dep_getkey(virt_choice), 1))
+ pprovided = pprovideddict.get(expanded_atom.cp)
+ if pprovided and \
+ portage.match_from_list(expanded_atom, pprovided):
+ # A provided package has been
+ # specified on the command line.
+ self._dynamic_config._pprovided_args.append((arg, atom))
+ pprovided_match = True
+ break
+ if pprovided_match:
+ continue
+
if not (isinstance(arg, SetArg) and \
arg.name in ("system", "world")):
self._dynamic_config._unsatisfied_deps_for_display.append(