summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-07 02:36:56 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-07 02:36:56 +0000
commit6df54199312a1d6d628cd0a852f4b667d8ad833a (patch)
tree9efe4c8d98e4f5bbbf6b8fd843d74b3a8abf2a79
parent1a8d03bcd2538f7cb1eff46f847e7794564d1356 (diff)
downloadportage-6df54199312a1d6d628cd0a852f4b667d8ad833a.tar.gz
portage-6df54199312a1d6d628cd0a852f4b667d8ad833a.tar.bz2
portage-6df54199312a1d6d628cd0a852f4b667d8ad833a.zip
Move all the --update greedy slot logic to depgraph.select_files().
svn path=/main/trunk/; revision=9738
-rw-r--r--pym/_emerge/__init__.py19
1 files changed, 6 insertions, 13 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 33259e044..173404378 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -2017,17 +2017,6 @@ class depgraph(object):
return 0
return 1
- def _greedy_slot_atoms(self, root, atom):
- """Generate SLOT atoms for the highest available match and
- any matching installed SLOTs that are also available."""
- vardb = self.roots[root].trees["vartree"].dbapi
- mykey = portage.dep_getkey(atom)
- myslots = set()
- for cpv in vardb.match(mykey):
- myslots.add(vardb.aux_get(cpv, ["SLOT"])[0])
- for myslot in myslots:
- yield "%s:%s" % (mykey, myslot)
-
def _iter_atoms_for_pkg(self, pkg):
# TODO: add multiple $ROOT support
if pkg.root != self.target_root:
@@ -2257,9 +2246,13 @@ class depgraph(object):
greedy_atoms.append(arg)
if not isinstance(arg, (AtomArg, PackageArg)):
continue
- for greedy_atom in self._greedy_slot_atoms(myroot, arg.atom):
+ atom_cp = portage.dep_getkey(arg.atom)
+ slots = set()
+ for cpv in vardb.match(atom_cp):
+ slots.add(vardb.aux_get(cpv, ["SLOT"])[0])
+ for slot in slots:
greedy_atoms.append(
- AtomArg(arg=arg.arg, atom=greedy_atom,
+ AtomArg(arg=arg.arg, atom="%s:%s" % (atom_cp, slot),
root_config=root_config))
args = greedy_atoms
del greedy_atoms