代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/anaconda 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From d1bb8d1d49de9668e8afc697aef8166d6c5bfabe Mon Sep 17 00:00:00 2001
From: t_feng <fengtao40@huawei.com>
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。