From 2dcfbbcaefc12706fcf7a4d2fbcb752dadfae3e5 Mon Sep 17 00:00:00 2001 From: Nils Hanke Date: Mon, 13 Feb 2023 18:59:55 +0100 Subject: [PATCH] Allow RPM to return total file sizes larger than 4GB 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. --- mkosi/manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkosi/manifest.py b/mkosi/manifest.py index 1d0c1e2f8..6ade9c99c 100644 --- a/mkosi/manifest.py +++ b/mkosi/manifest.py @@ -106,7 +106,7 @@ class Manifest: 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, ) -- 2.47.3