mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-06-06 05:21:28 +00:00
Handle missing debian-keyring more gracefully
This commit is contained in:
parent
d7c0cad962
commit
b62377b374
4
debian/control
vendored
4
debian/control
vendored
@ -56,7 +56,9 @@ Recommends: bzr,
|
|||||||
python-magic,
|
python-magic,
|
||||||
python-soappy,
|
python-soappy,
|
||||||
reportbug (>= 3.39ubuntu1)
|
reportbug (>= 3.39ubuntu1)
|
||||||
Suggests: python-simplejson | python (>= 2.7), qemu-kvm-extras-static
|
Suggests: debian-keyring,
|
||||||
|
python-simplejson | python (>= 2.7),
|
||||||
|
qemu-kvm-extras-static
|
||||||
Breaks: ${python:Breaks}
|
Breaks: ${python:Breaks}
|
||||||
Description: useful tools for Ubuntu developers
|
Description: useful tools for Ubuntu developers
|
||||||
This is a collection of useful tools that Ubuntu developers use to make their
|
This is a collection of useful tools that Ubuntu developers use to make their
|
||||||
|
1
debian/copyright
vendored
1
debian/copyright
vendored
@ -27,6 +27,7 @@ Copyright: 2007, Albert Damen <albrt@gmx.net>
|
|||||||
2010, Evan Broder <evan@ebroder.net>
|
2010, Evan Broder <evan@ebroder.net>
|
||||||
2006-2007, Luke Yelavich <themuso@ubuntu.com>
|
2006-2007, Luke Yelavich <themuso@ubuntu.com>
|
||||||
2009-2010, Michael Bienia <geser@ubuntu.com>
|
2009-2010, Michael Bienia <geser@ubuntu.com>
|
||||||
|
2010-2011, Stefano Rivera <stefanor@ubuntu.com>
|
||||||
2008, Stephan Hermann <sh@sourcecode.de>
|
2008, Stephan Hermann <sh@sourcecode.de>
|
||||||
2007, Steve Kowalik <stevenk@ubuntu.com>
|
2007, Steve Kowalik <stevenk@ubuntu.com>
|
||||||
License: GPL-2
|
License: GPL-2
|
||||||
|
@ -228,18 +228,29 @@ class SourcePackage(object):
|
|||||||
assert self.version.debian_revision == version.debian_revision
|
assert self.version.debian_revision == version.debian_revision
|
||||||
self.version = version
|
self.version = version
|
||||||
|
|
||||||
gpg_info = self.dsc.get_gpg_info()
|
valid = False
|
||||||
if gpg_info.valid():
|
message = None
|
||||||
message = 'Valid signature'
|
gpg_info = None
|
||||||
else:
|
try:
|
||||||
message = 'Signature on %s could not be verified' % self.dsc_name
|
gpg_info = self.dsc.get_gpg_info()
|
||||||
if 'GOODSIG' in gpg_info:
|
valid = gpg_info.valid()
|
||||||
message = 'Good signature by %s (0x%s)' % (gpg_info['GOODSIG'][1],
|
except IOError:
|
||||||
gpg_info['GOODSIG'][0])
|
message = ('Signature on %s could not be verified, install '
|
||||||
elif 'VALIDSIG' in gpg_info:
|
'debian-keyring' % self.dsc_name)
|
||||||
message = 'Valid signature by 0x%s' % gpg_info['VALIDSIG'][0]
|
if message is None:
|
||||||
|
if valid:
|
||||||
|
message = 'Valid signature'
|
||||||
|
else:
|
||||||
|
message = ('Signature on %s could not be verified'
|
||||||
|
% self.dsc_name)
|
||||||
|
if gpg_info is not None:
|
||||||
|
if 'GOODSIG' in gpg_info:
|
||||||
|
message = ('Good signature by %s (0x%s)'
|
||||||
|
% (gpg_info['GOODSIG'][1], gpg_info['GOODSIG'][0]))
|
||||||
|
elif 'VALIDSIG' in gpg_info:
|
||||||
|
message = 'Valid signature by 0x%s' % gpg_info['VALIDSIG'][0]
|
||||||
if verify_signature:
|
if verify_signature:
|
||||||
if gpg_info.valid():
|
if valid:
|
||||||
Logger.normal(message)
|
Logger.normal(message)
|
||||||
else:
|
else:
|
||||||
Logger.error(message)
|
Logger.error(message)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user