extras-buildsys/utils/pushscript Utils.py,1.23,1.24

Michael Schwendt (mschwendt) fedora-extras-commits at redhat.com
Wed Oct 24 20:09:07 UTC 2007


Author: mschwendt

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

Modified Files:
	Utils.py 
Log Message:
let's try this for _gpg_path => --homedir eval


Index: Utils.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/pushscript/Utils.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- Utils.py	24 Oct 2007 19:52:37 -0000	1.23
+++ Utils.py	24 Oct 2007 20:09:04 -0000	1.24
@@ -80,12 +80,14 @@
         sys.exit(errno.EPERM)
 
 
-# FIXME: In ~/.rpmmacros we also set %_gpg_path
-# for GPG we would set --homedir
-# but we don't have this path in the Config_Foo.py file ;-)
 def sign_key_check(keyname):
-    return
-    gpg = os.popen("gpg --list-secret-keys --with-colons '%s'" % keyname)
+    gpgpath = os.popen('rpm --eval %_gpg_path','r').read().rstrip()
+    if (gpgpath != '%_gpg_path'):
+        gpgpath = '--homedir %s'%gpgpath
+    else:
+        gpgpath = ''
+
+    gpg = os.popen("gpg %s --list-secret-keys --with-colons '%s'" % (gpgpath,keyname))
     gpgout = gpg.readlines()
     seckeys = 0
     for l in gpgout:




More information about the fedora-extras-commits mailing list