From a8ea2eda52e4c33e140a37590c5243000ab411ed Mon Sep 17 00:00:00 2001 From: Evan Goode Date: Wed, 20 May 2026 14:43:07 -0400 Subject: [PATCH] history info: Fix Persistence display for interval queries Resolves: RHEL-154737 --- ...-Persistence-display-for-interval-qu.patch | 38 +++++++++++++++++++ dnf.spec | 6 ++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 0073-history-info-Fix-Persistence-display-for-interval-qu.patch diff --git a/0073-history-info-Fix-Persistence-display-for-interval-qu.patch b/0073-history-info-Fix-Persistence-display-for-interval-qu.patch new file mode 100644 index 0000000..1e5f803 --- /dev/null +++ b/0073-history-info-Fix-Persistence-display-for-interval-qu.patch @@ -0,0 +1,38 @@ +From 056c452cb8031766fa46c1aa6ac949018505abf6 Mon Sep 17 00:00:00 2001 +From: Evan Goode +Date: Mon, 9 Mar 2026 22:23:50 -0400 +Subject: [PATCH] history info: Fix Persistence display for interval queries + +print_persistence() took a persistence parameter but compared against +old.persistence (the property on the transaction object) instead. For +merged transactions, old.persistence returns a list, so comparisons +against scalar enum values always failed, displaying 'Unknown'. + +Use the function parameter instead of old.persistence. + +For: https://github.com/rpm-software-management/libdnf/issues/1744 + +Assisted-by: Claude Opus 4.6 +--- + dnf/cli/output.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dnf/cli/output.py b/dnf/cli/output.py +index 820ab88fa..3fdd68432 100644 +--- a/dnf/cli/output.py ++++ b/dnf/cli/output.py +@@ -1773,9 +1773,9 @@ Transaction Summary + print(_("Command Line :"), old.cmdline) + + def print_persistence(persistence): +- if old.persistence == libdnf.transaction.TransactionPersistence_PERSIST: ++ if persistence == libdnf.transaction.TransactionPersistence_PERSIST: + persistence_str = "Persist" +- elif old.persistence == libdnf.transaction.TransactionPersistence_TRANSIENT: ++ elif persistence == libdnf.transaction.TransactionPersistence_TRANSIENT: + persistence_str = "Transient" + else: + persistence_str = "Unknown" +-- +2.54.0 + diff --git a/dnf.spec b/dnf.spec index 8fc0549..a06cd3c 100644 --- a/dnf.spec +++ b/dnf.spec @@ -73,7 +73,7 @@ It supports RPMs, modules and comps groups & environments. Name: dnf Version: 4.14.0 -Release: 35%{?dist} +Release: 36%{?dist} Summary: %{pkg_summary} # For a breakdown of the licensing, see PACKAGE-LICENSING License: GPLv2+ @@ -151,6 +151,7 @@ Patch69: 0069-autoremove-warn-and-skip-dangling-protected-dependen.patch Patch70: 0070-bootc-unlock-only-if-usr-is-read-only.patch Patch71: 0071-bootc-Call-make_writable-when-DeploymentUnlockedStat.patch Patch72: 0072-Preserve-ACL-when-rotating-logs.patch +Patch73: 0073-history-info-Fix-Persistence-display-for-interval-qu.patch BuildArch: noarch BuildRequires: cmake @@ -457,6 +458,9 @@ popd # bootc subpackage does not include any files %changelog +* Wed May 20 2026 Evan Goode - 4.14.0-36 +- history info: Fix Persistence display for interval queries (RHEL-154737) + * Thu Mar 26 2026 Petr Pisar - 4.14.0-35 - Preserve ACL when rotating logs (RHEL-122013)