Fix USE filtering code so that it doesn't rely on config.setcpv()
authorZac Medico <zmedico@gentoo.org>
Tue, 18 Dec 2007 14:14:22 +0000 (14:14 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 18 Dec 2007 14:14:22 +0000 (14:14 -0000)
calling config.regenerate().

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

pym/portage/__init__.py

index 7e1998b3a28e596ce60a44e8b7311a4131f7dbc1..663d84685e02b60c85db68c6459f84d5d643224f 100644 (file)
@@ -2395,7 +2395,9 @@ class config(object):
                #  * Forced flags, such as those from {,package}use.force
                #  * build and bootstrap flags used by bootstrap.sh
 
-               if self.mycpv:
+               if True:
+                       # Do this even when there's no package since setcpv() can
+                       # optimize away regenerate() calls.
                        iuse_implicit = set(iuse)
 
                        # Flags derived from ARCH.
@@ -2428,7 +2430,7 @@ class config(object):
                                iuse_grep = "^(%s)$" % "|".join(sorted(iuse_grep))
                        else:
                                iuse_grep = ""
-                       self.configdict["pkg"]["PORTAGE_IUSE"] = iuse_grep
+                       self["PORTAGE_IUSE"] = iuse_grep
 
                        usesplit = [x for x in usesplit if \
                                x in iuse_implicit and \