From bb10dd7f9153cd836526ad7259d797283860a4e6 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Tue, 29 Nov 2016 10:04:23 +0100 Subject: [PATCH 1/2] do not crash for empty device partition like e.g. in /dev/loop (bsc#986124) --- src/modules/BootStorage.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/BootStorage.rb b/src/modules/BootStorage.rb index 2c1133d0d..dc0e2cb46 100644 --- a/src/modules/BootStorage.rb +++ b/src/modules/BootStorage.rb @@ -160,6 +160,7 @@ def InitDiskInfo parts = partitions.map do |p| raid = p["used_by_type"] == :UB_MD ? p["used_by_device"] : nil device = p["device"] || "" + next nil if device.empty? # We only pass along RAID1 devices as all other causes # severe breakage in the bootloader stack @md_info[raid] << device if raid && @md_info.include?(raid) @@ -178,7 +179,7 @@ def InitDiskInfo ::Bootloader::UdevMapping.to_mountby_device(device) ] end - res.concat(parts) + res.concat(parts.compact) end end From 053d5731a855f7528b05875d70165f13508bed4f Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Tue, 29 Nov 2016 10:18:06 +0100 Subject: [PATCH 2/2] Changes --- package/yast2-bootloader.changes | 7 +++++++ package/yast2-bootloader.spec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package/yast2-bootloader.changes b/package/yast2-bootloader.changes index 9715eb278..696f8c53c 100644 --- a/package/yast2-bootloader.changes +++ b/package/yast2-bootloader.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Nov 29 09:17:26 UTC 2016 - jreidinger@suse.com + +- do not crash for empty device partition like partitions living + on /dev/loop (bsc#986124) +- 3.1.162.1 + ------------------------------------------------------------------- Fri Nov 27 14:46:57 CET 2015 - snwint@suse.de diff --git a/package/yast2-bootloader.spec b/package/yast2-bootloader.spec index 32f8622ea..60ed4192f 100644 --- a/package/yast2-bootloader.spec +++ b/package/yast2-bootloader.spec @@ -17,7 +17,7 @@ Name: yast2-bootloader -Version: 3.1.162 +Version: 3.1.162.1 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build