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