From 9f81a3dcf6cd0e942f9dfa253ca7f71d1214c6667fe6c08bafa47d090c65b641 Mon Sep 17 00:00:00 2001 From: Andrei Borzenkov Date: Thu, 14 May 2015 17:32:30 +0000 Subject: [PATCH] Accepting request 307028 from home:michael-chang:bsc892364 - os-prober-btrfsfix-trim-leading-subvol.patch * fix os-prober fails to detect other SLES12 installation (bsc#892364) OBS-URL: https://build.opensuse.org/request/show/307028 OBS-URL: https://build.opensuse.org/package/show/Base:System/os-prober?expand=0&rev=51 --- os-prober-btrfsfix-trim-leading-subvol.patch | 13 +++++++++++++ os-prober.changes | 6 ++++++ os-prober.spec | 5 ++++- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 os-prober-btrfsfix-trim-leading-subvol.patch diff --git a/os-prober-btrfsfix-trim-leading-subvol.patch b/os-prober-btrfsfix-trim-leading-subvol.patch new file mode 100644 index 0000000..09877c1 --- /dev/null +++ b/os-prober-btrfsfix-trim-leading-subvol.patch @@ -0,0 +1,13 @@ +Index: os-prober/linux-boot-probes/mounted/common/40grub2 +=================================================================== +--- os-prober.orig/linux-boot-probes/mounted/common/40grub2 ++++ os-prober/linux-boot-probes/mounted/common/40grub2 +@@ -16,7 +16,7 @@ found_item=0 + entry_result () { + if [ "x$type" = "xbtrfs" -a "$rootsv" = "$bootsv" ]; then + # trim off the leading subvol +- kernelfile=$(echo "$kernel" | cut -d '/' -f 2- | cut -d '/' -f 2-) ++ kernelfile=$(echo "$kernel" | sed -e "s!^/${rootsv}/!!") + else + kernelfile=$kernel + fi diff --git a/os-prober.changes b/os-prober.changes index b045f74..7d1a32f 100644 --- a/os-prober.changes +++ b/os-prober.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed May 13 15:45:30 UTC 2015 - mchang@suse.com + +- os-prober-btrfsfix-trim-leading-subvol.patch + * fix os-prober fails to detect other SLES12 installation (bsc#892364) + ------------------------------------------------------------------- Mon Jan 26 09:35:55 UTC 2015 - mchang@suse.com diff --git a/os-prober.spec b/os-prober.spec index 218c820..f722cd9 100644 --- a/os-prober.spec +++ b/os-prober.spec @@ -1,7 +1,7 @@ # # spec file for package os-prober # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -56,6 +56,8 @@ Patch14: os-prober-skip-part-on-multipath.patch Patch15: os-prober-call-dmraid-once.patch # PATCH-FIX-OPENSUSE: fix os-prober misinterprets Windows 8 to be Vista (bsc#910654) Patch16: os-prober-grep-for-windows-bcd-file.patch +# PATCH-FIX-SLE: fix os-prober fails to detect other SLES12 installation (bsc#892364) +Patch17: os-prober-btrfsfix-trim-leading-subvol.patch Requires: /bin/grep Requires: /bin/sed Requires: /sbin/modprobe @@ -93,6 +95,7 @@ cp %{SOURCE1} . %patch14 -p1 %patch15 -p1 %patch16 -p1 +%patch17 -p1 find . -name \*.orig -delete %build