When calling doebuild() to spawn the 'depend' phase, just call config.setcpv() v2.1.6.10
authorZac Medico <zmedico@gentoo.org>
Mon, 23 Mar 2009 05:55:31 +0000 (05:55 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 23 Mar 2009 05:55:31 +0000 (05:55 -0000)
since that should be enough (no need for separate reset or reload calls).
(trunk r13170)

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

pym/_emerge/__init__.py
pym/portage/__init__.py
pym/portage/dbapi/porttree.py

index 67ec6de0e7bd8beb0c59999c36cff5ac4a2d6d1c..c1999dd082bf1e3e7390a56d39a89d89a444a1eb 100644 (file)
@@ -3008,7 +3008,7 @@ class EbuildMetadataPhase(SubProcess):
 
        def _start(self):
                settings = self.settings
-               settings.reset()
+               settings.setcpv(self.cpv)
                ebuild_path = self.ebuild_path
                debug = settings.get("PORTAGE_DEBUG") == "1"
                master_fd = None
index 3e28b62b3ed228018321a2d773699fa191a3e12d..aa3c63b8b26908ca4ff8371bfa2b38571a9cdd52 100644 (file)
@@ -5035,14 +5035,14 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, m
        tmpdir = mysettings["PORTAGE_TMPDIR"]
 
        if mycpv != mysettings.mycpv:
-               # Reload env.d variables and reset any previous settings.
-               mysettings.reload()
-               mysettings.reset()
                if mydo == 'depend':
                        # Don't pass in mydbapi here since the resulting aux_get
                        # call would lead to infinite 'depend' phase recursion.
                        mysettings.setcpv(mycpv)
                else:
+                       # Reload env.d variables and reset any previous settings.
+                       mysettings.reload()
+                       mysettings.reset()
                        mysettings.setcpv(mycpv, mydb=mydbapi)
 
        # config.reset() might have reverted a change made by the caller,
index 93730e9c333a4d6f98b008f7be2294566cdf7df2..077715239aadbe4b3217f129d27c1eb55c34e815 100644 (file)
@@ -417,7 +417,7 @@ class portdbapi(dbapi):
                        writemsg("doregen: %s %s\n" % (doregen, mycpv), 2)
                        writemsg("Generating cache entry(0) for: "+str(myebuild)+"\n", 1)
 
-                       self.doebuild_settings.reset()
+                       self.doebuild_settings.setcpv(mycpv)
                        mydata = {}
                        myret = doebuild(myebuild, "depend",
                                self.doebuild_settings["ROOT"], self.doebuild_settings,