From 30fa34bc0cd2393eb4ae713b66e13edf5a8c6609 Mon Sep 17 00:00:00 2001 From: Angelo Naselli Date: Sun, 17 Nov 2024 16:47:46 +0100 Subject: [PATCH] Reloading daemon if transaction fails --- dnfdragora/ui.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dnfdragora/ui.py b/dnfdragora/ui.py index bfdbae1..d87ce40 100644 --- a/dnfdragora/ui.py +++ b/dnfdragora/ui.py @@ -2316,7 +2316,13 @@ def _OnBuildTransaction(self, info): err = "".join(errors) if isinstance(errors, list) else errors if type(errors) is str else repr(errors); dialogs.infoMsgBox({'title' : _('Build Transaction error',), 'text' : err.replace("\n", "
"), 'richtext' : True }) logger.warning("Transaction Cancelled: %s", repr(errors)) - self._enableAction(True) + + # TODO Transaction has errors we should clean it up reload all by now + self.backend.reloadDaemon() + self.backend.clear_cache(also_groups=True) + self.packageQueue.clear() + self._status = DNFDragoraStatus.STARTUP + self._enableAction(False) return # If status is RUN_TRANSACTION we have already confirmed our transaction into BuildTransaction # and we are here most probably for a GPG key confirmed during last transaction