[yum-cvs] yum/yum __init__.py,1.259.2.4,1.259.2.5
Jeremy Katz
katzj at linux.duke.edu
Tue Nov 28 22:22:17 UTC 2006
Update of /home/groups/yum/cvs/yum/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv5390/yum
Modified Files:
Tag: yum-3_0_X
__init__.py
Log Message:
* fix a deprecation warning
* give an idea of where gpg keys come from on the import; add a new callback
method that's more extensible
Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.259.2.4
retrieving revision 1.259.2.5
diff -u -r1.259.2.4 -r1.259.2.5
--- __init__.py 24 Nov 2006 18:14:25 -0000 1.259.2.4
+++ __init__.py 28 Nov 2006 22:22:15 -0000 1.259.2.5
@@ -1234,7 +1234,7 @@
'searching in provides entries')
for (p_name, p_flag, (p_e, p_v, p_r)) in po.provides:
if arg_re.search(p_name):
- prov = po.prcoPrintable((p_name, p_flag, (p_e, p_v, p_r)))
+ prov = misc.prco_tuple_to_string((p_name, p_flag, (p_e, p_v, p_r)))
tmpvalues.append(prov)
if len(tmpvalues) > 0:
@@ -1972,12 +1972,16 @@
return False
return installed
- def getKeyForPackage(self, po, askcb = None):
+ def getKeyForPackage(self, po, askcb = None, fullaskcb = None):
"""Retrieve a key for a package. If needed, prompt for if the
key should be imported using askcb.
@po: Package object to retrieve the key of.
@askcb: Callback function to use for asking for verification. Takes
- arguments of the po, the userid for the key, and the keyid."""
+ arguments of the po, the userid for the key, and the keyid.
+ @fullaskcb: Callback function to use for asking for verification
+ of a key. Differs from askcb in that it gets passed a
+ dictionary so that we can expand the values passed.
+ """
repo = self.repos.getRepo(po.repoid)
keyurls = repo.gpgkey
@@ -2013,10 +2017,13 @@
continue
# Try installing/updating GPG key
- self.logger.critical('Importing GPG key 0x%s "%s"' % (hexkeyid, userid))
+ self.logger.critical('Importing GPG key 0x%s "%s" from %s' % (hexkeyid, userid, keyurl.replace("file://","")))
rc = False
if self.conf.assumeyes:
rc = True
+ elif fullaskcb:
+ rc = fullaskcb({"po": po, "userid": userid,
+ "hexkeyid": hexkeyid, "keyurl": keyurl})
elif askcb:
rc = askcb(po, userid, hexkeyid)
More information about the Yum-cvs-commits
mailing list