Hello community, here is the log from the commit of package grub2 for openSUSE:Factory checked in at 2019-03-12 09:49:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/grub2 (Old) and /work/SRC/openSUSE:Factory/.grub2.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "grub2" Tue Mar 12 09:49:46 2019 rev:201 rq:683534 version:2.02 Changes: -------- --- /work/SRC/openSUSE:Factory/grub2/grub2.changes 2019-02-17 12:18:41.576244210 +0100 +++ /work/SRC/openSUSE:Factory/.grub2.new.28833/grub2.changes 2019-03-12 09:49:49.687580958 +0100 @@ -1,0 +2,5 @@ +Wed Feb 20 08:38:55 UTC 2019 - [email protected] + +- Fix LOADER_TYPE parsing in grub2-once (boo#1122569) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ grub2-once ++++++ --- /var/tmp/diff_new_pack.txWAVY/_old 2019-03-12 09:49:55.987579702 +0100 +++ /var/tmp/diff_new_pack.txWAVY/_new 2019-03-12 09:49:55.987579702 +0100 @@ -199,17 +199,24 @@ $grub2_dir = ""; while (<SYSCONF>) { - if (/^#/) { - next - }; - if (/LOADER_TYPE="(.*)"/) { - my $bl = $1; - if ($bl eq "grub2" || $bl eq "grub2-efi") { + chomp; + next if ( /^\s*#/ ); + if ( /LOADER_TYPE=(\'|\"|)([^\'\"\s]+)\1(\s*|\s+#.*)$/ ) { + dPrint("OK : $2\n"); + if ($2 eq "grub2" || $2 eq "grub2-efi") { + # Found grub2 to be the incumbent loader ... $grub2_dir = "/boot/grub2"; $grub2_reboot = "/usr/sbin/grub2-reboot"; $grub2_editenv = "/usr/bin/grub2-editenv"; + # Note : Here we continues rather than exiting the loop, which + # results in different behavior than previous "the first wins". Now + # the latest defined LOADER_TYPE can be used to override any + # previous one, which is identical to the result of regular shell + # variable expansion to meet most people's expectation. } - last; + } else { + next if ( /^\s*$/ ); + dPrint("SKIP: <$_>\n"); } }
