From 814a383ed009d7f9af0b512ec69af175eca9f35d Mon Sep 17 00:00:00 2001 From: Marcus Huewe Date: Mon, 6 Sep 2010 14:28:39 +0200 Subject: [PATCH] - fetch.py: check if we got all packages (--cpio-bulk-download is used) --- osc/fetch.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/osc/fetch.py b/osc/fetch.py index 44ee4e29..5f4253ba 100644 --- a/osc/fetch.py +++ b/osc/fetch.py @@ -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)