summaryrefslogtreecommitdiffstats
path: root/pym/portage
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-11 00:37:20 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-11 00:37:20 +0000
commite5a3fdc093e03bcad70a026dd271c99c6f78965e (patch)
tree130181334453eb3e6c2b19eb487887386e5a7242 /pym/portage
parent213ec0359c628a1a0756476428867dfda7ca0dc8 (diff)
downloadportage-e5a3fdc093e03bcad70a026dd271c99c6f78965e.tar.gz
portage-e5a3fdc093e03bcad70a026dd271c99c6f78965e.tar.bz2
portage-e5a3fdc093e03bcad70a026dd271c99c6f78965e.zip
Tweak --buildpkgonly and fakeroot logic so that --buildpkgonly can be
used by a non-root user to build binary packages with fakeroot. svn path=/main/trunk/; revision=9825
Diffstat (limited to 'pym/portage')
-rw-r--r--pym/portage/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index a622439aa..fa2d79307 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -2900,7 +2900,7 @@ def spawn(mystring, mysettings, debug=0, free=0, droppriv=0, sesandbox=0, fakero
if not free:
free=((droppriv and "usersandbox" not in features) or \
(not droppriv and "sandbox" not in features and \
- "usersandbox" not in features))
+ "usersandbox" not in features and not fakeroot))
if free or "SANDBOX_ACTIVE" in os.environ:
keywords["opt_name"] += " bash"
@@ -4468,6 +4468,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
vartree = db[myroot]["vartree"]
features = mysettings.features
+ from portage.data import secpass
validcommands = ["help","clean","prerm","postrm","cleanrm","preinst","postinst",
"config","info","setup","depend","fetch","digest",
@@ -4974,7 +4975,8 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
"sesandbox" in mysettings.features
droppriv = "userpriv" in mysettings.features and \
- "userpriv" not in restrict
+ "userpriv" not in restrict and \
+ secpass >= 2
fakeroot = "fakeroot" in mysettings.features