repoman = not mysettings.local_config
if kwargs["use_binaries"]:
portdb = trees[myroot]["bintree"].dbapi
- myvirtuals = mysettings.getvirtuals()
pprovideddict = mysettings.pprovideddict
myuse = kwargs["myuse"]
for x in mysplit:
if atom_graph is not None:
atom_graph.add((x, id(x)), graph_parent)
continue
- mychoices = myvirtuals.get(mykey, [])
+
if x.blocker:
# Virtual blockers are no longer expanded here since
# the un-expanded virtual atom is more useful for
else:
# TODO: Add PROVIDE check for repoman.
a = []
+ myvartree = mytrees.get("vartree")
+ if myvartree is not None:
+ mysettings._populate_treeVirtuals_if_needed(myvartree)
+ mychoices = mysettings.getvirtuals().get(mykey, [])
for y in mychoices:
a.append(Atom(x.replace(x.cp, y.cp, 1)))
if not a:
# only use new-style matches
if pkg.cp.startswith("virtual/"):
pkgs.append(pkg)
+
+ mychoices = []
+ if not pkgs and not portdb.cp_list(x.cp):
+ myvartree = mytrees.get("vartree")
+ if myvartree is not None:
+ mysettings._populate_treeVirtuals_if_needed(myvartree)
+ mychoices = mysettings.getvirtuals().get(mykey, [])
+
if not (pkgs or mychoices):
# This one couldn't be expanded as a new-style virtual. Old-style
# virtuals have already been expanded by dep_virtual, so this one
def _populate_treeVirtuals_if_needed(self, vartree):
"""Reduce the provides into a list by CP."""
- self._virtuals_manager.populate_treeVirtuals_if_needed(vartree)
+ if self._virtuals_manager._treeVirtuals is None:
+ if self.local_config:
+ self._virtuals_manager.populate_treeVirtuals_if_needed(vartree)
+ else:
+ self._virtuals_manager._treeVirtuals = {}
def __delitem__(self,mykey):
self.modifying()