!203 fix a mistake about revert "Set default entry to the BLS id instead of the entry index"
From: @wanglu210 Reviewed-by: @anonymous_z Signed-off-by: @anonymous_z
This commit is contained in:
commit
9d555c9a48
@ -1,7 +1,7 @@
|
||||
%define _empty_manifest_terminate_build 0
|
||||
Name: anaconda
|
||||
Version: 33.19
|
||||
Release: 44
|
||||
Release: 45
|
||||
Summary: Graphical system installer
|
||||
License: GPLv2+ and MIT
|
||||
URL: http://fedoraproject.org/wiki/Anaconda
|
||||
@ -365,6 +365,12 @@ update-desktop-database &> /dev/null || :
|
||||
%{_prefix}/libexec/anaconda/dd_*
|
||||
|
||||
%changelog
|
||||
* Fri Aug 5 2022 wanglu <wanglu210@huawei.com> - 33.19-45
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
- SUG:NA
|
||||
- DESC:fix a mistake about revert "Set default entry to the BLS id instead of the entry index"
|
||||
|
||||
* Thu Aug 4 2022 wanglu <wanglu210@huawei.com> - 33.19-44
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
|
||||
@ -29,16 +29,16 @@ index 3209ab7..6a6441b 100644
|
||||
-
|
||||
- default_entry = "%s-%s" % (machine_id, self.default.version)
|
||||
- rc = util.execInSysroot("grub2-set-default", [default_entry])
|
||||
+ #find the index of the default image
|
||||
+ # find the index of the default image
|
||||
+ try:
|
||||
+ default_index = self.images.index(self.default)
|
||||
+ except VauleError:
|
||||
+ 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.exeInSysroot("grub2-set-default", [str(default_index)])
|
||||
+ rc = util.execInSysroot("grub2-set-default", [str(default_index)])
|
||||
if rc:
|
||||
log.error("failed to set default menu entry to %s", productName)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user