summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-11 00:50:03 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-11 00:50:03 +0000
commit9ed3fd241f19521673106325ac72707b291a5868 (patch)
tree86740dd20c674a7d25f7af9b3c7066ca70f1e0cc /pym
parente9aff24b881a700257b2056114189755303c908c (diff)
downloadportage-9ed3fd241f19521673106325ac72707b291a5868.tar.gz
portage-9ed3fd241f19521673106325ac72707b291a5868.tar.bz2
portage-9ed3fd241f19521673106325ac72707b291a5868.zip
Tweak --buildpkgonly and fakeroot logic so that --buildpkgonly can be
used by a non-root user to build binary packages with fakeroot. (trunk r9825) svn path=/main/branches/2.1.2/; revision=9826
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py
index cc47a3cb2..504c20f3f 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -2903,7 +2903,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"
@@ -4470,6 +4470,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",
@@ -4972,7 +4973,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