extras-buildsys/utils extras-push-new,1.17,1.18

Ville Skytta (scop) fedora-extras-commits at redhat.com
Thu Jun 1 21:05:31 UTC 2006


Author: scop

Update of /cvs/fedora/extras-buildsys/utils
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3427

Modified Files:
	extras-push-new 
Log Message:
Improve configurability.


Index: extras-push-new
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/extras-push-new,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- extras-push-new	24 May 2006 20:29:29 -0000	1.17
+++ extras-push-new	1 Jun 2006 21:05:29 -0000	1.18
@@ -24,7 +24,8 @@
 
 DEBUG = False
 
-signersgid = 100581  # extras_signers group
+signersgid = 100581  # signers group
+signkeyname = 'extras at fedoraproject.org'
 
 distro = 'fedora'
 project = 'extras'
@@ -491,11 +492,17 @@
 if __name__ == '__main__':
     if opts.gidcheck:
         if os.getgid() != signersgid:
-            print 'ERROR: Change into extras_signers group before running this!  Use "newgrp extras_signers".'
+            grpname = '(unknown)'
+            try:
+                import grp
+                grpname = grp.getgrgid(signersgid)[0]
+            except:
+                print 'WARNING: Could not get group name for gid %d' % signersgid
+            print 'ERROR: Change into the %s group before running this!  Use "newgrp %s".' % (grpname, grpname)
             sys.exit(errno.EPERM)
 
     if opts.signkeycheck:
-        if 'extras at fedoraproject.org' != os.popen('rpm --eval %_gpg_name','r').read().rstrip():
+        if signkeyname != os.popen('rpm --eval %_gpg_name','r').read().rstrip():
             print 'ERROR: Configure ~/.rpmmacros for proper GPG signing before running this!'
             sys.exit(errno.EPERM)
 




More information about the fedora-extras-commits mailing list