cli: don't check size for signed rpms
We store only size of unsigned copy in db, so checking it for signed rpms results in error. Fixes: https://pagure.io/koji/issue/2394
This commit is contained in:
parent
15bb8b6656
commit
53d1081f27
1 changed files with 7 additions and 6 deletions
|
|
@ -558,12 +558,13 @@ def download_rpm(build, rpm, topurl, sigkey=None, quiet=False, noprogress=False)
|
|||
|
||||
download_file(url, path, quiet=quiet, noprogress=noprogress, filesize=rpm['size'])
|
||||
|
||||
# size
|
||||
size = os.path.getsize(path)
|
||||
if size != rpm['size']:
|
||||
os.unlink(path)
|
||||
error("Downloaded rpm %s size %d does not match db size %d, deleting" %
|
||||
(path, size, rpm['size']))
|
||||
# size - we have stored size only for unsigned copies
|
||||
if not sigkey:
|
||||
size = os.path.getsize(path)
|
||||
if size != rpm['size']:
|
||||
os.unlink(path)
|
||||
error("Downloaded rpm %s size %d does not match db size %d, deleting" %
|
||||
(path, size, rpm['size']))
|
||||
|
||||
# basic sanity
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue