Fix 'equery uses' to not print USE flags multiple times. Bug #91623
authorfuzzyray <fuzzyray@gentoo.org>
Fri, 16 Sep 2005 19:23:57 +0000 (19:23 -0000)
committerfuzzyray <fuzzyray@gentoo.org>
Fri, 16 Sep 2005 19:23:57 +0000 (19:23 -0000)
svn path=/; revision=236

trunk/src/equery/equery

index b0f15f6122eb3756383c3280beed9ef445bbbdc2..ef19072e355d4fe45a9f86e42b000cbe3548a4fb 100755 (executable)
@@ -27,6 +27,7 @@ sys.path.insert(0, "/usr/lib/gentoolkit/pym")
 import gentoolkit
 import portage
 import portage_checksum
+from portage_util import unique_array
 
 import gentoolkit.pprinter as pp
 from gentoolkit.pprinter import print_info, print_error, print_warn, die
@@ -499,7 +500,10 @@ class CmdDisplayUSEs(Command):
                        iuse = p.get_env_var("IUSE")
                  
                        if iuse:
-                               usevar = iuse.split()
+                               # Fix Bug #91623 by making sure the list of USE flags is unique
+                               # Added sort to make output prettier
+                               usevar = unique_array(iuse.split())
+                               usevar.sort()
                        else:
                                usevar = []