history info: Fix Persistence display for interval queries

Resolves: RHEL-154737
This commit is contained in:
Evan Goode 2026-05-20 14:43:07 -04:00
parent b12656cfa5
commit a8ea2eda52
2 changed files with 43 additions and 1 deletions

View File

@ -0,0 +1,38 @@
From 056c452cb8031766fa46c1aa6ac949018505abf6 Mon Sep 17 00:00:00 2001
From: Evan Goode <mail@evangoo.de>
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

View File

@ -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 <egoode@redhat.com> - 4.14.0-36
- history info: Fix Persistence display for interval queries (RHEL-154737)
* Thu Mar 26 2026 Petr Pisar <ppisar@redhat.com> - 4.14.0-35
- Preserve ACL when rotating logs (RHEL-122013)