代码拉取完成,页面将自动刷新
同步操作将从 src-anolis-os/anaconda 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 091ac4c4b5420227f6cc8171bf086c6791b623fc Mon Sep 17 00:00:00 2001
From: pangqing <pangqing@uniontech.com>
Date: Tue, 10 Aug 2021 09:59:06 +0800
Subject: [PATCH] anaconda anolis support boot.iso
---
pyanaconda/payload/dnf/payload.py | 1 +
pyanaconda/ui/gui/spokes/kernel_selection.py | 19 ++++++++++++++++++-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/payload/dnf/payload.py b/pyanaconda/payload/dnf/payload.py
index 1f9fd6a..dc00d41 100644
--- a/pyanaconda/payload/dnf/payload.py
+++ b/pyanaconda/payload/dnf/payload.py
@@ -780,6 +780,7 @@ class DNFPayload(Payload):
def detectMultiKernel(self):
kernel_patterns=["kernel", "kernel-tools", "python3-perf", "kernel-headers", "kernel-devel", "bpftool", "perf"]
+ # Get exception, when repo's format is wrong (eg. wrong repo url by inst.addrepo or inst.repo)
ypl = self._base._do_package_lists("available", kernel_patterns, True)
for pkg in ypl.available:
if pkg.version in self._available_kernels:
diff --git a/pyanaconda/ui/gui/spokes/kernel_selection.py b/pyanaconda/ui/gui/spokes/kernel_selection.py
index d8f092c..de9b496 100644
--- a/pyanaconda/ui/gui/spokes/kernel_selection.py
+++ b/pyanaconda/ui/gui/spokes/kernel_selection.py
@@ -119,7 +119,10 @@ class KernelSelectionSpoke(NormalSpoke):
# use first kernel as default, normally it's rhck
if not self.current_kernel:
- self.current_kernel = list(self.available_kernels.keys())[0]
+ # Check if self.available_kernels is empty
+ # When there are no RPMs repo in DVD iso, and net repo is not set, the available_kernels will be empty.
+ if len(self.available_kernels) > 0:
+ self.current_kernel = list(self.available_kernels.keys())[0]
hubQ.send_ready(self.__class__.__name__, False)
self._apply()
@@ -186,6 +189,20 @@ class KernelSelectionSpoke(NormalSpoke):
threadMgr.wait(constants.THREAD_PAYLOAD)
self._clear_listbox(self._kernelListBox)
+ # Obtain available_kernels by payload, after refresh the RPMs repo by 'Installation Source' manually.
+ log.info('To trigger payload.detectMultiKernel')
+ self.payload.detectMultiKernel()
+ # use first kernel as default, normally it's rhck
+ if not self.current_kernel:
+ # Check if self.available_kernels is empty
+ # When there are no RPMs repo in DVD iso, and net repo is not set, the available_kernels will be empty.
+ if len(self.available_kernels) > 0:
+ log.info('len of available_kernels: %d', len(self.available_kernels))
+ self.current_kernel = list(self.available_kernels.keys())[0]
+
+ hubQ.send_ready(self.__class__.__name__, False)
+ self._apply()
+
kernel_keys = self.available_kernels.keys()
for kernel in kernel_keys:
radio = Gtk.RadioButton(group=self._fakeRadio)
--
2.18.4
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。