From: Zac Medico Date: Tue, 2 Mar 2010 18:25:32 +0000 (-0000) Subject: Fix conditional logic for userpriv_groups intialization. (trunk r15279) X-Git-Tag: v2.1.8~204 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6a10ae51ee1aa9cb675a6e653695e37f93237e3d;p=portage.git Fix conditional logic for userpriv_groups intialization. (trunk r15279) svn path=/main/branches/2.1.7/; revision=15518 --- 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