From: Zac Medico Date: Tue, 3 Oct 2006 22:09:41 +0000 (-0000) Subject: For userpriv support, chown files in ${T} if necessary after priveleged phases. X-Git-Tag: v2.1.2~721 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=44a8231992512760e4f4a51af01b8253d2e66e00;p=portage.git For userpriv support, chown files in ${T} if necessary after priveleged phases. svn path=/main/trunk/; revision=4583 --- 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":