rpmlint/0001-DocCheck-adjust-for-rpm-4.19.0-API-changes.patch

27 lines
1.1 KiB
Diff
Raw Normal View History

From c2a3d7506387110bc0d03147ecdc75aed3432122 Mon Sep 17 00:00:00 2001
From: Todd Zullinger <tmz@pobox.com>
Date: Thu, 25 May 2023 13:12:12 -0400
Subject: [PATCH] DocCheck: adjust for rpm-4.19.0 API changes
Apparently, using `dsFromHeader()` has been deprecated for a long time.
Using `rpm.ds()` is the preferred method. It has been available for ~10
years, according to rpm commit 8d32255ff (Drop hdr.dsFromHeader() and
hdr.dsOfHeader() methods, 2022-04-08).
---
rpmlint/checks/DocCheck.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rpmlint/checks/DocCheck.py b/rpmlint/checks/DocCheck.py
index a1922fcd..4e77e7a6 100644
--- a/rpmlint/checks/DocCheck.py
+++ b/rpmlint/checks/DocCheck.py
@@ -60,7 +60,7 @@ class DocCheck(AbstractCheck):
core_reqs = {} # dependencies of non-doc files
doc_reqs = {} # dependencies of doc files
- for dep in pkg.header.dsFromHeader():
+ for dep in rpm.ds(pkg.header, 'requires'):
# skip deps which were found by find-requires
if dep.Flags() & rpm.RPMSENSE_FIND_REQUIRES != 0:
continue