Blame SOURCES/0004-plugin-debug-Use-base._ts.dbCookie-to-determining-rp.patch

74214d
From 66bac802e84fcf97dbe32690c33c420cb8f16891 Mon Sep 17 00:00:00 2001
74214d
From: Jaroslav Rohel <jrohel@redhat.com>
74214d
Date: Fri, 4 Feb 2022 10:28:59 +0100
74214d
Subject: [PATCH] plugin debug: Use base._ts.dbCookie() to determining rpmdb
74214d
 version
74214d
74214d
The debug plugin used `base.sack._rpmdb_version()` method. Which is
74214d
actually the private method `hawkey.Sack._rpmdb_version()` from libdnf.
74214d
74214d
The patch uses the `base._ts.dbCookie()` method. This method was added
74214d
to DNF 4.11.0. And internally it calls the new official API function
74214d
`rpm.TransactionSet.dbCookie()` from librpm. This is a necessary step
74214d
to allow the `._rpmdb_version()` method to be removed from libdnf.
74214d
---
74214d
 plugins/debug.py | 2 +-
74214d
 1 file changed, 1 insertion(+), 1 deletion(-)
74214d
74214d
diff --git a/plugins/debug.py b/plugins/debug.py
74214d
index ad136a9..c443f71 100644
74214d
--- a/plugins/debug.py
74214d
+++ b/plugins/debug.py
74214d
@@ -161,7 +161,7 @@ class DebugDumpCommand(dnf.cli.Command):
74214d
 
74214d
     def dump_rpmdb_versions(self):
74214d
         self.write("%%%%RPMDB VERSIONS\n")
74214d
-        version = self.base.sack._rpmdb_version()
74214d
+        version = self.base._ts.dbCookie()
74214d
         self.write("  all: %s\n" % version)
74214d
         return
74214d
 
74214d
-- 
74214d
2.34.1
74214d