diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-03-16 04:57:48 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-03-16 04:57:48 +0000 |
commit | 4abe1ab1650a86538d7fcf74ca2c1688b40fa6f9 (patch) | |
tree | d2326a9fb7d5176d70dbe6b1a29d1d32edc48246 | |
parent | 659eafddd5964820ce8bdc0d90f5fcf7df04b5b7 (diff) | |
download | portage-4abe1ab1650a86538d7fcf74ca2c1688b40fa6f9.tar.gz portage-4abe1ab1650a86538d7fcf74ca2c1688b40fa6f9.tar.bz2 portage-4abe1ab1650a86538d7fcf74ca2c1688b40fa6f9.zip |
Move environment variables WORKDIR, D, and T from prepare_build_dirs to doebuild_environment.
svn path=/main/trunk/; revision=2904
-rw-r--r-- | pym/portage.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pym/portage.py b/pym/portage.py index 47308629f..2aace4c45 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -2454,6 +2454,10 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, t else: mysettings["PORTAGE_BUILDDIR"] = os.path.join(mysettings["BUILD_PREFIX"], mysettings["PF"]) + mysettings["WORKDIR"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "work") + mysettings["D"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "image") + os.sep + mysettings["T"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "temp") + mysettings["PORTAGE_BASHRC"] = EBUILD_SH_ENV_FILE #set up KV variable -- DEP SPEEDUP :: Don't waste time. Keep var persistent. @@ -2476,9 +2480,8 @@ def prepare_build_dirs(myroot, mysettings, cleanup): apply_secpass_permissions(mysettings["BUILD_PREFIX"], uid=portage_uid, gid=portage_gid, mode=00775) - # Should be ok again to set $T, as sandbox does not depend on it - # XXX Bug. no way in hell this is valid for clean handling. - mysettings["T"]=mysettings["PORTAGE_BUILDDIR"]+"/temp" + # We enable cleanup when we want to make sure old cruft (such as the old + # environment) doesn't interfere with the current phase. if cleanup: if os.path.exists(mysettings["T"]): shutil.rmtree(mysettings["T"]) @@ -2621,9 +2624,6 @@ def prepare_build_dirs(myroot, mysettings, cleanup): features.remove("distcc") mysettings["DISTCC_DIR"]="" - mysettings["WORKDIR"]=mysettings["PORTAGE_BUILDDIR"]+"/work" - mysettings["D"]=mysettings["PORTAGE_BUILDDIR"]+"/image/" - workdir_mode = 0700 try: workdir_mode = int(eval(mysettings["PORTAGE_WORKDIR_MODE"])) |