diff --git a/anaconda.spec b/anaconda.spec index 0743ca80ad1b72392e79bf35e52210583a5f47bc..9c9b91d4c6d4ea1b27db514b344041a7f8191156 100644 --- a/anaconda.spec +++ b/anaconda.spec @@ -1,7 +1,7 @@ %define _empty_manifest_terminate_build 0 Name: anaconda Version: 33.19 -Release: 9 +Release: 10 Summary: Graphical system installer License: GPLv2+ and MIT URL: http://fedoraproject.org/wiki/Anaconda @@ -35,6 +35,7 @@ Patch9022: disable-disk-encryption.patch Patch6001: anaconda-Fix-stage2-as-default-sources.patch Patch6002: anaconda-Allow-to-detect-devices-with-the-iso9660-file-system.patch +Patch9023: bugfix-add-dnf-transaction-timeout.patch %define dbusver 1.2.3 %define dnfver 3.6.0 @@ -246,6 +247,12 @@ update-desktop-database &> /dev/null || : %{_datadir}/gtk-doc %changelog +* Fri Sep 25 2020 fengtao - 33.19-10 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add dnf transactions timeout + * Tue Sep 15 2020 xiaqirong - 33.19-9 - Type:bugfix - ID:NA diff --git a/bugfix-add-dnf-transaction-timeout.patch b/bugfix-add-dnf-transaction-timeout.patch new file mode 100644 index 0000000000000000000000000000000000000000..542c8102ade3989a80c484f2837aae035a433ccf --- /dev/null +++ b/bugfix-add-dnf-transaction-timeout.patch @@ -0,0 +1,52 @@ +From d1bb8d1d49de9668e8afc697aef8166d6c5bfabe Mon Sep 17 00:00:00 2001 +From: t_feng +Date: Fri, 25 Sep 2020 23:16:04 +0800 +Subject: [PATCH] add dnf transaction timeout + +--- + pyanaconda/core/constants.py | 3 +++ + pyanaconda/payload/dnf/payload.py | 7 ++++++- + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/pyanaconda/core/constants.py b/pyanaconda/core/constants.py +index 0e4cc15..607f96c 100644 +--- a/pyanaconda/core/constants.py ++++ b/pyanaconda/core/constants.py +@@ -448,6 +448,9 @@ URL_TYPE_BASEURL = "BASEURL" + URL_TYPE_MIRRORLIST = "MIRRORLIST" + URL_TYPE_METALINK = "METALINK" + ++#DNF trasactions timeout ++DNF_TRANSACTIONS_TIMEOUT = 1800 ++ + # The default source for the DNF payload. + DNF_DEFAULT_SOURCE_TYPE = SOURCE_TYPE_CLOSEST_MIRROR + +diff --git a/pyanaconda/payload/dnf/payload.py b/pyanaconda/payload/dnf/payload.py +index f927208..08963cc 100644 +--- a/pyanaconda/payload/dnf/payload.py ++++ b/pyanaconda/payload/dnf/payload.py +@@ -19,6 +19,7 @@ + import configparser + import functools + import multiprocessing ++import queue + import os + import shutil + import sys +@@ -1356,7 +1357,11 @@ class DNFPayload(Payload): + if errors.errorHandler.cb(exc) == errors.ERROR_RAISE: + log.error("Installation failed: %r", exc) + go_to_failure_limbo() +- (token, msg) = queue_instance.get() ++ try: ++ (token, msg) = queue_instance.get(True, constants.DNF_TRANSACTIONS_TIMEOUT) ++ except queue.Empty: ++ msg = ("Payload error - DNF installation has timeouted") ++ raise PayloadError(msg) + + process.join() + # Don't close the mother base here, because we still need it. +-- +2.23.0 +