代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/anaconda 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 971650357e4d7228cfa95ea01bc61e69715b159c Mon Sep 17 00:00:00 2001
From: zhangqiumiao <zhangqiumiao1@huawei.com>
Date: Thu, 29 Apr 2021 09:09:10 -0400
Subject: [PATCH] revert "Set default entry to the BLS id instead of the entry index"
revert the patch of "Set default entry to the BLS id instead of the entry index"
Reference: https://github.com/rhinstaller/anaconda/commit/a252e4424bd51d6236d3b7b8e3840d8ca0af90a2
Conflict: https://github.com/rhinstaller/anaconda/commit/a252e4424bd51d6236d3b7b8e3840d8ca0af90a2
---
.../modules/storage/bootloader/grub2.py | 24 ++++++++-----------
1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/pyanaconda/modules/storage/bootloader/grub2.py b/pyanaconda/modules/storage/bootloader/grub2.py
index 48ca354..964c56a 100644
--- a/pyanaconda/modules/storage/bootloader/grub2.py
+++ b/pyanaconda/modules/storage/bootloader/grub2.py
@@ -335,20 +335,16 @@ class GRUB2(BootLoader):
# make sure the default entry is the OS we are installing
if self.default is not None:
- machine_id_path = conf.target.system_root + "/etc/machine-id"
- if not os.access(machine_id_path, os.R_OK):
- log.error("failed to read machine-id, default entry not set")
- return
-
- with open(machine_id_path, "r") as fd:
- machine_id = fd.readline().strip()
-
- default_entry = "%s-%s" % (machine_id, self.default.version)
- rc = util.execWithRedirect(
- "grub2-set-default",
- [default_entry],
- root=conf.target.system_root
- )
+ # find the index of the default image
+ try:
+ default_index = self.images.index(self.default)
+ except ValueError:
+ # pylint: disable=no-member
+ log.warning("Failed to find default image (%s), defaulting to 0",
+ self.default.label)
+ default_index = 0
+
+ rc = util.execInSysroot("grub2-set-default", [str(default_index)])
if rc:
log.error("failed to set default menu entry to %s", productName)
--
2.19.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。