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"])
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":