Accepting request 320020 from home:arvidjaar:grub2-next

- add os-prober-40grub-check-grub2.patch
  * also skip legacy grub if /boot/grub2/grub.cfg is present, not only
    /boot/grub/grub.cfg

OBS-URL: https://build.opensuse.org/request/show/320020
OBS-URL: https://build.opensuse.org/package/show/Base:System/os-prober?expand=0&rev=58
This commit is contained in:
Michael Chang 2015-08-03 03:05:51 +00:00 committed by Git OBS Bridge
parent d61f5aac8f
commit 0e7560730a
3 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,19 @@
From: Andrei Borzenkov <arvidjaar@gmail.com>
Subject: Also skip legacy grub if grub2 is found
Check for grub.cfg also in /boot/grub2, not only in /boot/grub.
Index: os-prober/linux-boot-probes/mounted/x86/40grub
===================================================================
--- os-prober.orig/linux-boot-probes/mounted/x86/40grub
+++ os-prober/linux-boot-probes/mounted/x86/40grub
@@ -95,7 +95,9 @@ fi
if [ "$grubconf" ] && \
([ ! -e "$mpoint/boot/grub/grub.cfg" ] || \
- [ "$mpoint/boot/grub/$grubconf" -nt "$mpoint/boot/grub/grub.cfg" ]); then
+ [ "$mpoint/boot/grub/$grubconf" -nt "$mpoint/boot/grub/grub.cfg" ]) && \
+ ([ ! -e "$mpoint/boot/grub2/grub.cfg" ] || \
+ [ "$mpoint/boot/grub/$grubconf" -nt "$mpoint/boot/grub2/grub.cfg" ]); then
debug "parsing $grubconf"
parse_grub_menu "$mpoint" "$partition" "$bootpart" < "$mpoint/boot/grub/$grubconf"
fi

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sun Aug 2 15:14:55 UTC 2015 - arvidjaar@gmail.com
- add os-prober-40grub-check-grub2.patch
* also skip legacy grub if /boot/grub2/grub.cfg is present, not only
/boot/grub/grub.cfg
-------------------------------------------------------------------
Thu Jun 18 10:24:05 UTC 2015 - mchang@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package os-prober
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -60,6 +60,8 @@ Patch16: os-prober-grep-for-windows-bcd-file.patch
Patch17: Improve-btrfs-handling-on-os-probing-for-grub2.patch
# PATCH-FIX-SLE: fix os-prober mount error, no such file or directory (bsc#931955)
Patch18: os-prober-btrfs-absolute-subvol.patch
# PATCH-FIX-OPENSUSE: also skip legacy grub if /boot/grub2/grub.cfg is present
Patch19: os-prober-40grub-check-grub2.patch
Requires: /bin/grep
Requires: /bin/sed
Requires: /sbin/modprobe
@ -99,6 +101,7 @@ cp %{SOURCE1} .
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
find . -name \*.orig -delete
%build