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

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