1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-20 17:26:15 +02:00

- fetch.py: check if we got all packages (--cpio-bulk-download is used)

This commit is contained in:
Marcus Huewe 2010-09-06 14:28:39 +02:00
parent b3e538be90
commit 814a383ed0

View File

@ -118,6 +118,11 @@ class Fetcher:
pac = pkgs[hdr.filename]
archive.copyin_file(hdr.filename, os.path.dirname(tmpfile), os.path.basename(tmpfile))
self.move_package(tmpfile, pac.localdir, pac)
# check if we got all packages... (because we've no .errors file)
for pac in pkgs.itervalues():
if not os.path.isfile(pac.fullfilename):
raise oscerr.APIError('failed to fetch file \'%s\': ' \
'does not exist in CPIO archive' % pac.repofilename)
finally:
if not tmparchive is None and os.path.exists(tmparchive):
os.unlink(tmparchive)