stack use flags from package.use for multiple matching atoms (bug #200385)
authorMarius Mauch <genone@gentoo.org>
Sun, 2 Mar 2008 14:45:52 +0000 (14:45 -0000)
committerMarius Mauch <genone@gentoo.org>
Sun, 2 Mar 2008 14:45:52 +0000 (14:45 -0000)
svn path=/main/trunk/; revision=9408

pym/portage/__init__.py

index dfbe70fc25c4d6855fcdf0e94657c19926a96b69..c10749368b0eaf22d0bb4dd758e28aa251605177 100644 (file)
@@ -1904,9 +1904,15 @@ class config(object):
                self.puse = ""
                cpdict = self.pusedict.get(cp)
                if cpdict:
-                       self.pusekey = best_match_to_list(cpv_slot, cpdict.keys())
-                       if self.pusekey:
-                               self.puse = " ".join(cpdict[self.pusekey])
+                       keys = cpdict.keys()
+                       while keys:
+                               self.pusekey = best_match_to_list(cpv_slot, keys)
+                               if self.pusekey:
+                                       keys.remove(self.pusekey)
+                                       self.puse += " "+" ".join(cpdict[self.pusekey])
+                               else:
+                                       break
+                       del keys
                if oldpuse != self.puse:
                        has_changed = True
                self.configdict["pkg"]["PKGUSE"] = self.puse[:] # For saving to PUSE file