[yum-cvs] yum/yum __init__.py,1.122,1.123 config.py,1.64,1.65
Menno Smits
mjs at login.linux.duke.edu
Wed Jun 15 11:49:48 UTC 2005
Update of /home/groups/yum/cvs/yum/yum
In directory login:/tmp/cvs-serv18474/yum
Modified Files:
__init__.py config.py
Log Message:
Support for multple GPG keys per repo.
Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -r1.122 -r1.123
--- __init__.py 14 Jun 2005 22:39:58 -0000 1.122
+++ __init__.py 15 Jun 2005 11:49:46 -0000 1.123
@@ -698,11 +698,11 @@
result = 1
else:
result = 2
- msg = 'public key not available for %s' % localfn
+ msg = 'Public key for %s is not installed' % localfn
elif sigresult == 2:
result = 2
- msg = 'problem opening package %s' % localfn
+ msg = 'Problem opening package %s' % localfn
elif sigresult == 3:
if hasgpgkey:
@@ -710,11 +710,11 @@
else:
result = 2
result = 1
- msg = 'untrusted public key for %s' % localfn
+ msg = 'Public key for %s is not trusted' % localfn
elif sigresult == 4:
result = 2
- msg = 'unsigned package %s' % localfn
+ msg = 'Package %s is not signed' % localfn
else:
result =0
Index: config.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/config.py,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- config.py 3 Jun 2005 20:10:28 -0000 1.64
+++ config.py 15 Jun 2005 11:49:46 -0000 1.65
@@ -458,14 +458,15 @@
thisrepo.set('mirrorlistfn', mirrorlistfn)
thisrepo.set('baseurls', baseurls)
- gpgkey = cfgparser._getoption(section, 'gpgkey', '')
- if gpgkey:
+ # Parse and check gpgkey URLs
+ gpgkeys = cfgparser._getoption(section, 'gpgkey', '')
+ gpgkeys = variableReplace(yumconfig.yumvar, gpgkeys)
+ gpgkeys = parseList(gpgkeys)
+ for gpgkey in gpgkeys:
(s,b,p,q,f,o) = urlparse.urlparse(gpgkey)
if s not in ('http', 'ftp', 'file', 'https'):
- print 'gpgkey must be ftp, http[s], or file URL, ignoring - %s' % gpgkey
- gpgkey = ''
- gpgkey = variableReplace(yumconfig.yumvar, gpgkey)
- thisrepo.set('gpgkey', gpgkey)
+ raise Errors.ConfigError, 'gpgkey must be ftp, http[s], or file URL: %s' % gpgkey
+ thisrepo.set('gpgkey', gpgkeys)
excludelist = cfgparser._getoption(section, 'exclude', [])
excludelist = variableReplace(yumconfig.yumvar, excludelist)
More information about the Yum-cvs-commits
mailing list