Uniformly check EAPI when avoiding setcpv calls.
authorZac Medico <zmedico@gentoo.org>
Sun, 5 Jun 2011 00:08:08 +0000 (17:08 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 5 Jun 2011 00:08:08 +0000 (17:08 -0700)
pym/portage/dbapi/_MergeProcess.py
pym/portage/dbapi/vartree.py
pym/portage/package/ebuild/doebuild.py

index 78e1ecd6703e4a230d613c22d1b69154ab41bf19..3b9ad8284b4651d27104636f42f7be84fedec823 100644 (file)
@@ -41,7 +41,7 @@ class MergeProcess(SpawnProcess):
                cpv = "%s/%s" % (self.mycat, self.mypkg)
                settings = self.settings
                if cpv != settings.mycpv or \
-                       "IUSE" not in settings.configdict["pkg"]:
+                       "EAPI" not in settings.configdict["pkg"]:
                        settings.reload()
                        settings.reset()
                        settings.setcpv(cpv, mydb=self.mydbapi)
index 16cf48b76dfc64f8cfd407df93201a1d918ce630..5c6166ca4eb0fc9f4eb00577070cf0349f8c6028 100644 (file)
@@ -1676,7 +1676,7 @@ class dblink(object):
                                break
 
                if self.mycpv != self.settings.mycpv or \
-                       "SLOT" not in self.settings.configdict["pkg"]:
+                       "EAPI" not in self.settings.configdict["pkg"]:
                        # We avoid a redundant setcpv call here when
                        # the caller has already taken care of it.
                        self.settings.setcpv(self.mycpv, mydb=self.vartree.dbapi)
index 4cdd765934fd57df3593664c8c28b9e8c3f837a6..5c81fbd45f7dd06ada46ce72a170a541acd39265 100644 (file)
@@ -167,12 +167,12 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
                        # call would lead to infinite 'depend' phase recursion.
                        mysettings.setcpv(mycpv)
        else:
-               # If IUSE isn't in configdict['pkg'], it means that setcpv()
+               # If EAPI isn't in configdict["pkg"], it means that setcpv()
                # hasn't been called with the mydb argument, so we have to
                # call it here (portage code always calls setcpv properly,
                # but api consumers might not).
                if mycpv != mysettings.mycpv or \
-                       'IUSE' not in mysettings.configdict['pkg']:
+                       "EAPI" not in mysettings.configdict["pkg"]:
                        # Reload env.d variables and reset any previous settings.
                        mysettings.reload()
                        mysettings.reset()