1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-25 17:36:13 +01:00

- fixed #665784 ("osc build --offline doesn't work for key verification")

This commit is contained in:
Marcus Huewe 2011-01-30 00:01:48 +01:00
parent 876b31d60a
commit ef06aa26cf

View File

@ -225,9 +225,12 @@ class Fetcher:
os.makedirs(dest, mode=0755)
dest += '/_pubkey'
url = "%s/source/%s/_pubkey" % (buildinfo.apiurl, i)
url = makeurl(buildinfo.apiurl, ['source', i, '_pubkey'])
try:
OscFileGrabber().urlgrab(url, dest)
if self.offline and not os.path.exists(dest):
raise oscerr.OscIOError(None, 'Missing pubkey for project \'%s\': --offline not possible' % i)
elif not self.offline:
OscFileGrabber().urlgrab(url, dest)
if not i in buildinfo.prjkeys: # not that many keys usually
buildinfo.keys.append(dest)
buildinfo.prjkeys.append(i)