summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-03-30 00:19:29 +0000
committerZac Medico <zmedico@gentoo.org>2008-03-30 00:19:29 +0000
commitd2675594af53ee4ee7e23e69357335e96c2fa6e7 (patch)
treebe6f581a51c029a20ca1a19442f3b544d787e11f
parentf69fb75f3359b7004a5241c9963aae800456a85e (diff)
downloadportage-d2675594af53ee4ee7e23e69357335e96c2fa6e7.tar.gz
portage-d2675594af53ee4ee7e23e69357335e96c2fa6e7.tar.bz2
portage-d2675594af53ee4ee7e23e69357335e96c2fa6e7.zip
Bug #215308 - Simplify the greedy atoms logic so that it behaves more
like StaticFileSet and won't pull in lower slots. svn path=/main/trunk/; revision=9607
-rw-r--r--pym/_emerge/__init__.py27
1 files changed, 5 insertions, 22 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index a4a0dc3d6..d03a2eacb 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -1985,28 +1985,11 @@ class depgraph(object):
myslots = set()
for cpv in vardb.match(mykey):
myslots.add(vardb.aux_get(cpv, ["SLOT"])[0])
- if myslots:
- self._populate_filtered_repo(root, atom,
- exclude_installed=True)
- mymatches = filtered_db.match(atom)
- best_pkg = portage.best(mymatches)
- if best_pkg:
- best_slot = filtered_db.aux_get(best_pkg, ["SLOT"])[0]
- myslots.add(best_slot)
- if len(myslots) > 1:
- for myslot in myslots:
- myslot_atom = "%s:%s" % (mykey, myslot)
- self._populate_filtered_repo(
- root, myslot_atom,
- exclude_installed=True)
- if filtered_db.match(myslot_atom):
- yield myslot_atom
-
- # Since populate_filtered_repo() was called with the
- # exclude_installed flag, these atoms will need to be processed
- # again in case installed packages are required to satisfy
- # dependencies.
- self._filtered_trees[root]["atoms"].clear()
+ for myslot in myslots:
+ yield "%s:%s" % (mykey, myslot)
+ # In addition to any installed slots, also try to pull
+ # in the latest new slot that may be available.
+ yield atom
def _iter_args_for_pkg(self, pkg):
# TODO: add multiple $ROOT support