]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
repo_rpmdb.c: Do not use deprecated headerUnload with newer rpm versions
authorMichael Schroeder <mls@suse.de>
Tue, 7 Nov 2023 10:54:09 +0000 (11:54 +0100)
committerMichael Schroeder <mls@suse.de>
Tue, 7 Nov 2023 10:54:09 +0000 (11:54 +0100)
We check the definition of RPM_MASK_TYPE to find out it rpm is
new enough.

ext/repo_rpmdb.c

index a60ed4fe9e0223063fbf245cf9f261035e322a42..17334e6e8c748ca1efa9a48262bbad98e89cf225 100644 (file)
@@ -2526,7 +2526,11 @@ rpm_byrpmh(void *rpmstate, Header h)
   if (!h)
     return 0;
 #ifndef RPM5
+# ifdef RPM_MASK_TYPE
+  uh = headerExport(h, NULL);
+# else
   uh = headerUnload(h);
+# endif
 #else
   uh = headerUnload(h, NULL);
 #endif