From 6e59ffdaa9a6d80ea062602db7e9ffd46228167a Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 1 Mar 2022 08:06:36 -0500 Subject: [PATCH] import dnf-plugins-core-4.0.24-3.el9 --- ...-base._ts.dbCookie-to-determining-rp.patch | 33 +++++++++++++++++++ SPECS/dnf-plugins-core.spec | 8 +++-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 SOURCES/0004-plugin-debug-Use-base._ts.dbCookie-to-determining-rp.patch diff --git a/SOURCES/0004-plugin-debug-Use-base._ts.dbCookie-to-determining-rp.patch b/SOURCES/0004-plugin-debug-Use-base._ts.dbCookie-to-determining-rp.patch new file mode 100644 index 0000000..898c56f --- /dev/null +++ b/SOURCES/0004-plugin-debug-Use-base._ts.dbCookie-to-determining-rp.patch @@ -0,0 +1,33 @@ +From 66bac802e84fcf97dbe32690c33c420cb8f16891 Mon Sep 17 00:00:00 2001 +From: Jaroslav Rohel +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 + diff --git a/SPECS/dnf-plugins-core.spec b/SPECS/dnf-plugins-core.spec index e40f8bb..fb4f9c9 100644 --- a/SPECS/dnf-plugins-core.spec +++ b/SPECS/dnf-plugins-core.spec @@ -1,4 +1,4 @@ -%{?!dnf_lowest_compatible: %global dnf_lowest_compatible 4.2.22} +%{?!dnf_lowest_compatible: %global dnf_lowest_compatible 4.10.0-4} %global dnf_plugins_extra 2.0.0 %global hawkey_version 0.46.1 %global yum_utils_subpackage_name dnf-utils @@ -34,7 +34,7 @@ Name: dnf-plugins-core Version: 4.0.24 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Core Plugins for DNF License: GPLv2+ URL: https://github.com/rpm-software-management/dnf-plugins-core @@ -42,6 +42,7 @@ Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Patch1: 0001-groups-manager-More-benevolent-resolving-of-packages-RhBug2013633.patch Patch2: 0002-versionlock-fix-multi-pkg-lock-RhBug2013324.patch Patch3: 0003-Update-documentation-for-adding-specific-version-RhBug2013332.patch +Patch4: 0004-plugin-debug-Use-base._ts.dbCookie-to-determining-rp.patch BuildArch: noarch BuildRequires: cmake @@ -768,6 +769,9 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/ %endif %changelog +* Mon Feb 07 2022 Pavla Kratochvilova - 4.0.24-3 +- Backport patch with new way to determine rpmdb version + * Thu Dec 09 2021 Pavla Kratochvilova - 4.0.24-2 - [groups-manager] Use full NEVRA for matching packages instead of only name (RhBug:2029864) - [versionlock] Fix: Multiple package-name-spec arguments don't lock (RhBug:2029871)