Make USE_EXPAND wildcard expansion more efficient, and prevent possible
authorZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 06:17:19 +0000 (06:17 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 06:17:19 +0000 (06:17 -0000)
duplicates. (trunk r12703)

svn path=/main/branches/2.1.6/; revision=12958

pym/portage/__init__.py

index c662e4e609ca1de1259e39983e166f97c6463e04..3820dcf34ec3bb5fcb64ce0545180bdc9939e06e 100644 (file)
@@ -2137,10 +2137,11 @@ class config(object):
                        if has_wildcard:
                                # * means to enable everything in IUSE that's not masked
                                if has_iuse:
-                                       for x in iuse_implicit:
-                                               if x[:prefix_len] == prefix and x not in self.usemask:
-                                                       suffix = x[prefix_len:]
-                                                       var_split.append(suffix)
+                                       for suffix in has_iuse:
+                                               x = prefix + suffix
+                                               if x not in usemask:
+                                                       if suffix not in expand_flags:
+                                                               var_split.append(suffix)
                                                        use.add(x)
                                else:
                                        # If there is a wildcard and no matching flags in IUSE then