1 Star 0 Fork 23

庞庆/anaconda_9

forked from src-anolis-os/anaconda 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0008-install-fix-kernel-spoke-notify.patch 3.24 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2022-05-17 21:12 . install: fix kernel spoke notify
--- a/pyanaconda/payload/dnf/payload.py 2022-05-16 18:42:00.000000000 +0800
+++ b/pyanaconda/payload/dnf/payload.py 2022-05-17 16:51:51.790618070 +0800
@@ -43,6 +43,7 @@
from collections import OrderedDict
from pyanaconda.modules.common.structures.payload import RepoConfigurationData
+from pyanaconda.modules.payloads.payload.dnf.installation import UpdateDNFConfigurationTask
from pyanaconda.payload.source import SourceFactory, PayloadSourceTypeUnrecognized
from pykickstart.constants import GROUP_ALL, GROUP_DEFAULT, KS_MISSING_IGNORE, GROUP_REQUIRED
from pykickstart.parser import Group
--- a/pyanaconda/ui/gui/spokes/installation_source.py 2022-05-16 18:42:00.000000000 +0800
+++ b/pyanaconda/ui/gui/spokes/installation_source.py 2022-05-17 15:20:49.282836205 +0800
@@ -756,6 +756,7 @@
target=self._initialize))
def _payload_refresh(self):
+ hubQ.send_not_ready("KernelSelectionSpoke")
hubQ.send_not_ready("SoftwareSelectionSpoke")
hubQ.send_not_ready(self.__class__.__name__)
hubQ.send_message(self.__class__.__name__, _(BASEREPO_SETUP_MESSAGE))
@@ -781,6 +782,7 @@
hubQ.send_message(self.__class__.__name__, _(constants.PAYLOAD_STATUS_GROUP_MD))
def _payload_finished(self):
+ hubQ.send_ready("KernelSelectionSpoke", False)
hubQ.send_ready("SoftwareSelectionSpoke", False)
self._ready = True
hubQ.send_ready(self.__class__.__name__, False)
diff -Nur a/pyanaconda/ui/gui/spokes/kernel_selection.py b/pyanaconda/ui/gui/spokes/kernel_selection.py
--- a/pyanaconda/ui/gui/spokes/kernel_selection.py 2022-05-16 18:42:00.000000000 +0800
+++ b/pyanaconda/ui/gui/spokes/kernel_selection.py 2022-05-17 17:28:05.356188435 +0800
@@ -64,7 +64,6 @@
# Register event listeners to update our status on payload events
payloadMgr.add_listener(PayloadState.ERROR, self._payload_error)
- payloadMgr.add_listener(PayloadState.FINISHED, self._payload_finished)
payloadMgr.add_listener(PayloadState.DOWNLOADING_PKG_METADATA,
self._downloading_package_md)
@@ -84,12 +83,6 @@
self._error = True
hubQ.send_message(self.__class__.__name__, payloadMgr.error)
- def _payload_finished(self):
- self._error_msgs = self.payload.detectMultiKernel()
- if not self._error_msgs:
- # use latest kernel as default, normally it's anck
- self.current_kernel = list(self.available_kernels.keys())[-1]
-
@property
def available_kernels(self):
return self.payload.available_kernels
@@ -150,8 +143,7 @@
threadMgr.wait(constants.THREAD_PAYLOAD)
if not self._kickstarted:
- if not self._first_refresh():
- return
+ self._first_refresh()
hubQ.send_ready(self.__class__.__name__, False)
@@ -232,6 +224,11 @@
threadMgr.wait(constants.THREAD_PAYLOAD)
+ self._error_msgs = self.payload.detectMultiKernel()
+ if not self._error_msgs:
+ # use latest kernel as default, normally it's anck
+ self.current_kernel = list(self.available_kernels.keys())[-1]
+
self._clear_listbox(self._kernelListBox)
kernel_keys = self.available_kernels.keys()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/pang-qing/anaconda_9.git
git@gitee.com:pang-qing/anaconda_9.git
pang-qing
anaconda_9
anaconda_9
a8

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385