For greedy slot behavior, in addition to any installed slots also
authorZac Medico <zmedico@gentoo.org>
Tue, 19 Feb 2008 08:27:22 +0000 (08:27 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 19 Feb 2008 08:27:22 +0000 (08:27 -0000)
try to pull in the latest new slot that may be available.

svn path=/main/trunk/; revision=9359

pym/portage/sets/files.py

index cc4862cc8b2021fd9d366e86229f196acb91bc34..683756ec506908c8990b073c676b6b9bcd2a2de5 100644 (file)
@@ -79,11 +79,12 @@ class StaticFileSet(EditablePackageSet):
                                atoms = []
                                for a in data.keys():
                                        matches = self.dbapi.match(a)
-                                       if len(matches) > 1:
-                                               for cpv in matches:
-                                                       atoms.append(dep_getkey(cpv)+":"+self.dbapi.aux_get(cpv, ["SLOT"])[0])
-                                       else:
-                                               atoms.append(a)
+                                       for cpv in matches:
+                                               atoms.append("%s:%s" % (cpv_getkey(cpv),
+                                                       self.dbapi.aux_get(cpv, ["SLOT"])[0]))
+                                       # In addition to any installed slots, also try to pull
+                                       # in the latest new slot that may be available.
+                                       atoms.append(a)
                        else:
                                atoms = data.keys()
                        self._setAtoms(atoms)