#2395 cli: don't check size for signed rpms
Merged 2 years ago by tkopecek. Opened 2 years ago by tkopecek.
tkopecek/koji issue2394  into  master

file modified
+7 -6
@@ -563,12 +563,13 @@ 

  

      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:

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

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

2 years ago

Hi @tkopecek , thank you for the PR, this looks like it will fix the problem we are seeing. Thanks!

Commit f3563f7 fixes this pull-request

Pull-Request has been merged by tkopecek

2 years ago

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

2 years ago