dnf-plugins-core/SOURCES/0015-Skip-all-non-rpm-tsi-for-transaction_action-plugins-.patch
2022-06-23 17:20:15 +00:00

29 lines
1.0 KiB
Diff

From b4e0cafe70680db24ab3611e0fd4dd95c8311ccc Mon Sep 17 00:00:00 2001
From: Jaroslav Mracek <jmracek@redhat.com>
Date: Tue, 26 Apr 2022 11:23:41 +0200
Subject: [PATCH] Skip all non rpm tsi for transaction_action plugins
(rhbug:2023652)
It prevent traceback in output when reason change is in transaction
---
plugins/post-transaction-actions.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/plugins/post-transaction-actions.py b/plugins/post-transaction-actions.py
index 05a7841..1520c26 100644
--- a/plugins/post-transaction-actions.py
+++ b/plugins/post-transaction-actions.py
@@ -115,6 +115,9 @@ class PostTransactionActions(dnf.Plugin):
in_ts_items.append(ts_item)
elif ts_item.action in dnf.transaction.BACKWARD_ACTIONS:
out_ts_items.append(ts_item)
+ else:
+ # The action is not rpm change. It can be a reason change, therefore we can skip that item
+ continue
all_ts_items.append(ts_item)
commands_to_run = []
--
2.36.1