In doebuild_environment(), fix KV logic so that it never
authorZac Medico <zmedico@gentoo.org>
Sat, 1 Dec 2007 00:25:53 +0000 (00:25 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 1 Dec 2007 00:25:53 +0000 (00:25 -0000)
gets set during the "depend" phase. Also, use
backup_changes() to properly cache the result.

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

pym/portage/__init__.py

index 8196526b1afc2a6dfb10b792c1d08c95757f743a..6606fe8fce746f26dd6f88c07324f5a6a89d4dbb 100644 (file)
@@ -3832,13 +3832,14 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, m
                mysettings["PORTAGE_BUILDDIR"], ".exit_status")
 
        #set up KV variable -- DEP SPEEDUP :: Don't waste time. Keep var persistent.
-       if (mydo!="depend") or not mysettings.has_key("KV"):
+       if mydo != "depend" and "KV" not in mysettings:
                mykv,err1=ExtractKernelVersion(os.path.join(myroot, "usr/src/linux"))
                if mykv:
                        # Regular source tree
                        mysettings["KV"]=mykv
                else:
                        mysettings["KV"]=""
+               mysettings.backup_changes("KV")
 
        # Allow color.map to control colors associated with einfo, ewarn, etc...
        mycolors = []