From 9ed3fd241f19521673106325ac72707b291a5868 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 11 Apr 2008 00:50:03 +0000 Subject: 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 --- pym/portage.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pym') 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 -- cgit v1.2.3-1-g7c22