diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-10-03 22:09:41 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-10-03 22:09:41 +0000 |
commit | 44a8231992512760e4f4a51af01b8253d2e66e00 (patch) | |
tree | 1285aa7f3e2ce68624a5acc48b4befa53afe440f | |
parent | 58e915606747c46fa1524e4428763a07c4559a98 (diff) | |
download | portage-44a8231992512760e4f4a51af01b8253d2e66e00.tar.gz portage-44a8231992512760e4f4a51af01b8253d2e66e00.tar.bz2 portage-44a8231992512760e4f4a51af01b8253d2e66e00.zip |
For userpriv support, chown files in ${T} if necessary after priveleged phases.
svn path=/main/trunk/; revision=4583
-rw-r--r-- | pym/portage.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py index 8e2e29190..d7c0db92d 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -2502,6 +2502,13 @@ def spawnebuild(mydo,actionmap,mysettings,debug,alwaysdep=0,logfile=None): mysettings["EBUILD_PHASE"] = mydo phase_retval = spawn(actionmap[mydo]["cmd"] % mydo, mysettings, debug=debug, logfile=logfile, **kwargs) del mysettings["EBUILD_PHASE"] + + if "userpriv" in mysettings.features and \ + not kwargs["droppriv"] and secpass >= 2: + # Privileged phases may have left files owned by root. + apply_recursive_permissions(mysettings["T"], + uid=portage_uid, gid=portage_gid) + if phase_retval == os.EX_OK: if mydo == "install": mycommand = " ".join([MISC_SH_BINARY, "install_qa_check"]) @@ -2900,7 +2907,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, if mydo in ["clean","cleanrm"]: return spawn(EBUILD_SH_BINARY + " clean", mysettings, debug=debug, free=1, logfile=None) - elif mydo in ["help","setup"]: + elif mydo == "help": return spawn(EBUILD_SH_BINARY + " " + mydo, mysettings, debug=debug, free=1, logfile=logfile) elif mydo == "preinst": |