dnf-plugins-core/SOURCES/0004-plugin-debug-Use-base._ts.dbCookie-to-determining-rp.patch
2022-05-17 15:27:49 +00:00

34 lines
1.1 KiB
Diff

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