[yum-cvs] yum/yum misc.py,1.8,1.8.2.1

Seth Vidal skvidal at login.linux.duke.edu
Sat Feb 26 09:14:03 UTC 2005


Update of /home/groups/yum/cvs/yum/yum
In directory login:/tmp/cvs-serv23308/yum

Modified Files:
      Tag: yum-2_2_X
	misc.py 
Log Message:

make sure keyInstalled check is occuring in the right rpmdb root.


Index: misc.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/misc.py,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -u -r1.8 -r1.8.2.1
--- misc.py	16 Jan 2005 09:50:15 -0000	1.8
+++ misc.py	26 Feb 2005 09:14:01 -0000	1.8.2.1
@@ -223,11 +223,12 @@
     return "%08x" % (keyid & 0xffffffffL)
 
 
-def keyInstalled(keyid, timestamp):
+def keyInstalled(ts, keyid, timestamp):
     '''Return if the GPG key described by the given keyid and timestamp are
     installed in the rpmdb.  
 
     The keyid and timestamp should both be passed as integers.
+    The ts is an rpm transaction set object
 
     Return values:
         -1      key is not installed
@@ -241,10 +242,6 @@
     # Convert key id to 'RPM' form
     keyid = keyIdToRPMVer(keyid)
 
-    # Init transaction
-    ts = rpmUtils.transaction.initReadOnlyTransaction()
-    ts.pushVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS))
-
     # Search
     for hdr in ts.dbMatch('name', 'gpg-pubkey'):
         if hdr['version'] == keyid:




More information about the Yum-cvs-commits mailing list