mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-26 01:46:13 +01:00
tweak output about used keys
This commit is contained in:
parent
f0e1e1c7b1
commit
40503680c1
@ -749,7 +749,7 @@ def main(apiurl, opts, argv):
|
||||
print 'Skipping verification of package signatures'
|
||||
else:
|
||||
print 'Verifying integrity of cached packages'
|
||||
verify_pacs([ i.fullfilename for i in bi.deps ], bi.keys)
|
||||
verify_pacs(bi)
|
||||
|
||||
elif bi.pacsuffix == 'deb':
|
||||
if vm_type == "xen" or vm_type == "kvm" or vm_type == "lxc":
|
||||
|
15
osc/fetch.py
15
osc/fetch.py
@ -230,8 +230,6 @@ class Fetcher:
|
||||
if self.http_debug:
|
||||
print "can't fetch key for %s: %s" %(i, e.strerror)
|
||||
print "url: %s" % url
|
||||
else:
|
||||
print "%s doesn't have a gpg key" % i
|
||||
|
||||
if os.path.exists(dest):
|
||||
os.unlink(dest)
|
||||
@ -308,30 +306,29 @@ def verify_pacs_old(pac_list):
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def verify_pacs(pac_list, key_list):
|
||||
def verify_pacs(bi):
|
||||
"""Take a list of rpm filenames and verify their signatures.
|
||||
|
||||
In case of failure, exit.
|
||||
"""
|
||||
|
||||
pac_list = [ i.fullfilename for i in bi.deps ]
|
||||
if not conf.config.get('builtin_signature_check', True):
|
||||
return verify_pacs_old(pac_list)
|
||||
|
||||
if not pac_list:
|
||||
return
|
||||
|
||||
if not key_list:
|
||||
print "no keys"
|
||||
sys.exit(1)
|
||||
return
|
||||
if not bi.keys:
|
||||
raise oscerr.APIError("can't verify packages due to lack of GPG keys")
|
||||
|
||||
print key_list
|
||||
print "using keys from", ', '.join(bi.prjkeys)
|
||||
|
||||
import checker
|
||||
failed = False
|
||||
checker = checker.Checker()
|
||||
try:
|
||||
checker.readkeys(key_list)
|
||||
checker.readkeys(bi.keys)
|
||||
for pkg in pac_list:
|
||||
try:
|
||||
checker.check(pkg)
|
||||
|
Loading…
Reference in New Issue
Block a user