diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-08-03 22:33:30 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-08-03 22:33:30 +0000 |
commit | da03b7847c5c46d2748908d9814dab66807863c8 (patch) | |
tree | 15860d1d3c0197a94fc2042243c90ce09a21a32f | |
parent | 4e3155e16536d3ea0b5891770b7e86d4a0de25c3 (diff) | |
download | portage-da03b7847c5c46d2748908d9814dab66807863c8.tar.gz portage-da03b7847c5c46d2748908d9814dab66807863c8.tar.bz2 portage-da03b7847c5c46d2748908d9814dab66807863c8.zip |
Make droppriv for the depend phase conditional on userpriv in FEATURES.
svn path=/main/trunk/; revision=7553
-rw-r--r-- | pym/portage/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 4d9f05e56..7f18803c1 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -3749,12 +3749,13 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, # get possible slot information from the deps file if mydo == "depend": writemsg("!!! DEBUG: dbkey: %s\n" % str(dbkey), 2) + droppriv = "userpriv" in mysettings.features if isinstance(dbkey, dict): mysettings["dbkey"] = "" pr, pw = os.pipe() fd_pipes = {0:0, 1:1, 2:2, 9:pw} mypids = spawn(EBUILD_SH_BINARY + " depend", mysettings, - fd_pipes=fd_pipes, returnpid=True, droppriv=1) + fd_pipes=fd_pipes, returnpid=True, droppriv=droppriv) os.close(pw) # belongs exclusively to the child process now maxbytes = 1024 mybytes = [] @@ -3782,7 +3783,8 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, mysettings["dbkey"] = \ os.path.join(mysettings.depcachedir, "aux_db_key_temp") - return spawn(EBUILD_SH_BINARY + " depend", mysettings, droppriv=1) + return spawn(EBUILD_SH_BINARY + " depend", mysettings, + droppriv=droppriv) # Validate dependency metadata here to ensure that ebuilds with invalid # data are never installed (even via the ebuild command). |