summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-05-17 09:28:38 +0000
committerZac Medico <zmedico@gentoo.org>2007-05-17 09:28:38 +0000
commitb5b30ec99d82e0bf4717d17b84c8331a3063667a (patch)
tree851de032895676c6bf7164db2a069d9e6da6b501 /pym
parent851d97cf07ce846079e02c800daa54bab8314c2a (diff)
downloadportage-b5b30ec99d82e0bf4717d17b84c8331a3063667a.tar.gz
portage-b5b30ec99d82e0bf4717d17b84c8331a3063667a.tar.bz2
portage-b5b30ec99d82e0bf4717d17b84c8331a3063667a.zip
wrap lines
svn path=/main/trunk/; revision=6542
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index acb403b80..9b9fbdcb6 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -2297,17 +2297,16 @@ def spawn(mystring, mysettings, debug=0, free=0, droppriv=0, sesandbox=0, **keyw
keywords["fd_pipes"] = fd_pipes
features = mysettings.features
- # XXX: Negative RESTRICT word
- droppriv=(droppriv and ("userpriv" in features) and not \
- (("nouserpriv" in mysettings["RESTRICT"].split()) or \
- ("userpriv" in mysettings["RESTRICT"].split())))
-
+ restrict = mysettings.get("RESTRICT", "").split()
+ droppriv=(droppriv and "userpriv" in features and not \
+ ("nouserpriv" in restrict or "userpriv" in restrict))
if droppriv and not uid and portage_gid and portage_uid:
- keywords.update({"uid":portage_uid,"gid":portage_gid,"groups":userpriv_groups,"umask":002})
-
+ keywords.update({"uid":portage_uid,"gid":portage_gid,
+ "groups":userpriv_groups,"umask":002})
if not free:
free=((droppriv and "usersandbox" not in features) or \
- (not droppriv and "sandbox" not in features and "usersandbox" not in features))
+ (not droppriv and "sandbox" not in features and \
+ "usersandbox" not in features))
if free:
keywords["opt_name"] += " bash"
@@ -2318,7 +2317,8 @@ def spawn(mystring, mysettings, debug=0, free=0, droppriv=0, sesandbox=0, **keyw
if sesandbox:
con = selinux.getcontext()
- con = con.replace(mysettings["PORTAGE_T"], mysettings["PORTAGE_SANDBOX_T"])
+ con = con.replace(mysettings["PORTAGE_T"],
+ mysettings["PORTAGE_SANDBOX_T"])
selinux.setexec(con)
returnpid = keywords.get("returnpid")