[Git][reproducible-builds/diffoscope][master] rpm: fix compat with rpm 6
Chris Lamb (@lamby)
gitlab at salsa.debian.org
Tue Sep 2 21:38:48 UTC 2025
Chris Lamb pushed to branch master at Reproducible Builds / diffoscope
Commits:
d1251804 by Zbigniew Jędrzejewski-Szmek at 2025-08-25T11:01:54+02:00
rpm: fix compat with rpm 6
The python interface in rpm 5.99 (pre-release for 6) dropped
RPMTAG_HEADERSIGNATURES, because it is not used anymore. But we need
to work with old and new rpms, so we need that value. Let's just copy
the enum values into the code. Those values can never change (or be
reused) because they are used in countless rpms.
- - - - -
1 changed file:
- diffoscope/comparators/rpm.py
Changes:
=====================================
diffoscope/comparators/rpm.py
=====================================
@@ -35,6 +35,9 @@ from .utils.archive import Archive
logger = logging.getLogger(__name__)
+RPMTAG_HEADERSIGNATURES = 62 # Removed in rpm 5.99
+RPMTAG_HEADERIMMUTABLE = 63
+
def convert_header_field(io, header):
if isinstance(header, list):
@@ -73,8 +76,8 @@ def get_rpm_header(path, ts):
continue
if rpmtag in {
- rpm.RPMTAG_HEADERSIGNATURES,
- rpm.RPMTAG_HEADERIMMUTABLE,
+ RPMTAG_HEADERSIGNATURES,
+ RPMTAG_HEADERIMMUTABLE,
}:
# Handle HEADERSIGNATURES and HEADERIMMUTABLE differently to
# avoid unnecessarily large diffs. (#410)
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/d12518047c5667c2c1c8718f03975826c0a54cd1
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/d12518047c5667c2c1c8718f03975826c0a54cd1
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20250902/0558f509/attachment.htm>
More information about the rb-commits
mailing list