Accepting request 147483 from home:arvidjaar:bnc:796919

- add grub2-add-device-to-os_prober-linux-menuentry.patch (bnc#796919)

OBS-URL: https://build.opensuse.org/request/show/147483
OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=4
This commit is contained in:
Michael Chang 2013-01-08 07:46:22 +00:00 committed by Git OBS Bridge
parent 7375ca8ab2
commit 45914f9cd9
3 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,39 @@
From: Andrey Borzenkov <arvidjaar@gmail.com>
Subject: add "(on /dev/XXX)" to top level os-prober Linux menu entries
References: bnc#796919
1. It disambiguates multiple instances of the same OS if present.
2. It allows menu entry to be skipped by another os-prober. Otherwise
it may result in endless recursion.
Index: grub-2.00/util/grub.d/30_os-prober.in
===================================================================
--- grub-2.00.orig/util/grub.d/30_os-prober.in
+++ grub-2.00/util/grub.d/30_os-prober.in
@@ -202,7 +202,7 @@ EOF
if [ "x$is_first_entry" = xtrue ]; then
cat << EOF
-menuentry '$(echo "$OS" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-simple-$boot_device_id' {
+menuentry '$(echo "$OS $onstr" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-simple-$boot_device_id' {
EOF
save_default_entry | sed -e "s/^/\t/"
printf '%s\n' "${prepare_boot_cache}"
@@ -217,7 +217,7 @@ EOF
cat << EOF
}
EOF
- echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'osprober-gnulinux-advanced-$boot_device_id' {"
+ echo "submenu '$(gettext_printf "Advanced options for %s" "${OS} $onstr" | grub_quote)' \$menuentry_id_option 'osprober-gnulinux-advanced-$boot_device_id' {"
is_first_entry=false
fi
title="${LLABEL} $onstr"
@@ -238,7 +238,7 @@ EOF
}
EOF
if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
- replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
+ replacement_title="$(echo "Advanced options for ${OS} $onstr" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)"
title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;"
grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")"

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jan 8 07:09:47 UTC 2013 - arvidjaar@gmail.com
- add grub2-add-device-to-os_prober-linux-menuentry.patch (bnc#796919)
-------------------------------------------------------------------
Sun Jan 6 18:54:54 UTC 2013 - arvidjaar@gmail.com

View File

@ -133,6 +133,7 @@ Patch23: grub2-secureboot-no-insmod-on-sb.patch
Patch24: grub2-secureboot-provide-linuxefi-config.patch
Patch25: 30_os-prober_UEFI_support.patch
Patch26: grub2-fix-enumeration-of-extended-partition.patch
Patch27: grub2-add-device-to-os_prober-linux-menuentry.patch
PreReq: perl-Bootloader
Requires: gettext-runtime
%if 0%{?suse_version} >= 1140
@ -246,6 +247,7 @@ mv docs/grub.texi docs/grub2.texi
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
cd ..
# README.openSUSE