From 6df54199312a1d6d628cd0a852f4b667d8ad833a Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 7 Apr 2008 02:36:56 +0000 Subject: [PATCH] Move all the --update greedy slot logic to depgraph.select_files(). svn path=/main/trunk/; revision=9738 --- pym/_emerge/__init__.py | 19 ++++++------------- 1 file 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 -- 2.26.2