When an RPM has a total content size over 4GB, the --qf parameter
needs to use LONGSIZE instead of SIZE to display the total package
content file size, likely to keep compatibility with code
expecting 32 bit friendly values.
Otherwise, if a package is larger than 4GB, RPM returns (none).
Since this is later given as input to Python's int(),
it will throw an exception due to (none) not being a number.
c = run(
["rpm", f"--root={root}", f"--dbpath={dbpath}", "-qa", "--qf",
- r"%{NEVRA}\t%{SOURCERPM}\t%{NAME}\t%{ARCH}\t%{SIZE}\t%{INSTALLTIME}\n"],
+ r"%{NEVRA}\t%{SOURCERPM}\t%{NAME}\t%{ARCH}\t%{LONGSIZE}\t%{INSTALLTIME}\n"],
stdout=PIPE,
text=True,
)