Skip to content

Commit

Permalink
plugin debug: Use base._ts.dbCookie() to determining rpmdb version
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jrohel authored and j-mracek committed Feb 4, 2022
1 parent 10e010c commit a27bc95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dnf-plugins-core.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%{?!dnf_lowest_compatible: %global dnf_lowest_compatible 4.10.1}
%{?!dnf_lowest_compatible: %global dnf_lowest_compatible 4.11.0}
%global dnf_plugins_extra 2.0.0
%global hawkey_version 0.64.0
%global yum_utils_subpackage_name dnf-utils
Expand Down Expand Up @@ -33,7 +33,7 @@
%endif

Name: dnf-plugins-core
Version: 4.0.25
Version: 4.0.26
Release: 1%{?dist}
Summary: Core Plugins for DNF
License: GPLv2+
Expand Down
2 changes: 1 addition & 1 deletion plugins/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def dump_packages(self, load_repos):

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

Expand Down

0 comments on commit a27bc95

Please sign in to comment.