summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-01-30 10:33:07 +0000
committerZac Medico <zmedico@gentoo.org>2010-01-30 10:33:07 +0000
commit6b1f0cf0ce755aa44c75539494d1b627ca9da425 (patch)
tree1edf493890de16973429a960eaa32365be9b3b76
parent06526eaa253ddcdec167462a12cb834f3e5f198e (diff)
downloadportage-6b1f0cf0ce755aa44c75539494d1b627ca9da425.tar.gz
portage-6b1f0cf0ce755aa44c75539494d1b627ca9da425.tar.bz2
portage-6b1f0cf0ce755aa44c75539494d1b627ca9da425.zip
Fix conditional logic for userpriv_groups intialization.
svn path=/main/trunk/; revision=15279
-rw-r--r--pym/portage/data.py39
1 files changed, 20 insertions, 19 deletions
diff --git a/pym/portage/data.py b/pym/portage/data.py
index 9ec3bc924..c82a8b625 100644
--- a/pym/portage/data.py
+++ b/pym/portage/data.py
@@ -96,22 +96,23 @@ except KeyError:
writemsg(colorize("GOOD", " portage::250:portage") + "\n",
noiselevel=-1)
portage_group_warning()
-
-userpriv_groups = [portage_gid]
-if secpass >= 2:
- # Get a list of group IDs for the portage user. Do not use grp.getgrall()
- # since it is known to trigger spurious SIGPIPE problems with nss_ldap.
- try:
- from subprocess import getstatusoutput
- except ImportError:
- from commands import getstatusoutput
- mystatus, myoutput = getstatusoutput("id -G portage")
- if mystatus == os.EX_OK:
- for x in myoutput.split():
- try:
- userpriv_groups.append(int(x))
- except ValueError:
- pass
- del x
- userpriv_groups = list(set(userpriv_groups))
- del getstatusoutput, mystatus, myoutput
+else:
+ userpriv_groups = [portage_gid]
+ if secpass >= 2:
+ # Get a list of group IDs for the portage user. Do not use
+ # grp.getgrall() since it is known to trigger spurious
+ # SIGPIPE problems with nss_ldap.
+ try:
+ from subprocess import getstatusoutput
+ except ImportError:
+ from commands import getstatusoutput
+ mystatus, myoutput = getstatusoutput("id -G portage")
+ if mystatus == os.EX_OK:
+ for x in myoutput.split():
+ try:
+ userpriv_groups.append(int(x))
+ except ValueError:
+ pass
+ del x
+ userpriv_groups = list(set(userpriv_groups))
+ del getstatusoutput, mystatus, myoutput