#2669 inconsistent sizes for external rpms
Opened 3 years ago by mikem. Modified 2 years ago

The size field in the rpminfo table is treated as a file size. In import_rpm, we have

rpminfo['size'] = os.path.getsize(fn)

However, for external rpm entries, we read the RPMTAG_SIZE header from the rpmdb of the buildroot. This field is not the size of the rpm file that was installed, but "the size of all the regular files in the payload" (ref)


It's not clear what we can or should do here, since we do not have the original file at this point to get the size from.

We could:

  1. keep doing what we're doing, but document it
  2. stop recording the size for external rpms altogether since we do not have it

I can think of more options, but they would involve refactoring the data.

Metadata Update from @mikem:
- Custom field Size adjusted to None

3 years ago

Maybe be stopping is better here? As it is already inconsistent - what happens when the same rpm is imported later?

Login to comment on this ticket.

Metadata