Redo virtuals code that relied on unique_array keeping the original order.
authorJason Stubbs <jstubbs@gentoo.org>
Sat, 31 Dec 2005 05:25:08 +0000 (05:25 -0000)
committerJason Stubbs <jstubbs@gentoo.org>
Sat, 31 Dec 2005 05:25:08 +0000 (05:25 -0000)
svn path=/main/trunk/; revision=2509

pym/portage.py

index da1b8e7421c00385ad65bc33587b7c45b91e471c..e7af5306a3a3e7970d55fc297590322e7816e83b 100644 (file)
@@ -1380,7 +1380,8 @@ class config:
                        if not self.treeVirtuals.has_key(virt):
                                self.treeVirtuals[virt] = []
                        # XXX: Is this bad? -- It's a permanent modification
-                       self.treeVirtuals[virt] = portage_util.unique_array(self.treeVirtuals[virt]+[cp])
+                       if cp not in self.treeVirtuals[virt]:
+                               self.treeVirtuals[virt].append(cp)
 
                self.virtuals = self.__getvirtuals_compile()