Hello community,

here is the log from the commit of package yast2-bootloader for 
openSUSE:Factory checked in at 2019-02-15 09:54:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-bootloader (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-bootloader.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-bootloader"

Fri Feb 15 09:54:05 2019 rev:272 rq:674893 version:4.1.17

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-bootloader/yast2-bootloader.changes        
2019-02-11 21:18:40.799295987 +0100
+++ 
/work/SRC/openSUSE:Factory/.yast2-bootloader.new.28833/yast2-bootloader.changes 
    2019-02-15 09:54:06.823784400 +0100
@@ -1,0 +2,6 @@
+Thu Feb 14 07:56:05 UTC 2019 - [email protected]
+
+- Do not crash if generated grub.cfg is missing (bsc#1124064)
+- 4.1.17
+
+-------------------------------------------------------------------

Old:
----
  yast2-bootloader-4.1.16.tar.bz2

New:
----
  yast2-bootloader-4.1.17.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.y6DOJf/_old  2019-02-15 09:54:07.331784240 +0100
+++ /var/tmp/diff_new_pack.y6DOJf/_new  2019-02-15 09:54:07.335784239 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        4.1.16
+Version:        4.1.17
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-bootloader-4.1.16.tar.bz2 -> yast2-bootloader-4.1.17.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.1.16/package/yast2-bootloader.changes 
new/yast2-bootloader-4.1.17/package/yast2-bootloader.changes
--- old/yast2-bootloader-4.1.16/package/yast2-bootloader.changes        
2019-02-08 11:18:31.000000000 +0100
+++ new/yast2-bootloader-4.1.17/package/yast2-bootloader.changes        
2019-02-14 09:43:59.000000000 +0100
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Thu Feb 14 07:56:05 UTC 2019 - [email protected]
+
+- Do not crash if generated grub.cfg is missing (bsc#1124064)
+- 4.1.17
+
+-------------------------------------------------------------------
 Fri Feb  8 08:47:35 UTC 2019 - [email protected]
 
 - Improve the layout of "Boot Code Options" tab (bsc#1120793)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.1.16/package/yast2-bootloader.spec 
new/yast2-bootloader-4.1.17/package/yast2-bootloader.spec
--- old/yast2-bootloader-4.1.16/package/yast2-bootloader.spec   2019-02-08 
11:18:31.000000000 +0100
+++ new/yast2-bootloader-4.1.17/package/yast2-bootloader.spec   2019-02-14 
09:43:59.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        4.1.16
+Version:        4.1.17
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.1.16/src/lib/bootloader/grub2base.rb 
new/yast2-bootloader-4.1.17/src/lib/bootloader/grub2base.rb
--- old/yast2-bootloader-4.1.16/src/lib/bootloader/grub2base.rb 2019-02-08 
11:18:31.000000000 +0100
+++ new/yast2-bootloader-4.1.17/src/lib/bootloader/grub2base.rb 2019-02-14 
09:43:59.000000000 +0100
@@ -82,9 +82,8 @@
       begin
         grub_cfg.load
       rescue Errno::ENOENT
-        # raise error only outside of first stage, as there may not need to be
-        # grub.cfg generated (bnc#976534)
-        raise unless Yast::Stage.initial
+        # there may not need to be grub.cfg generated 
(bnc#976534),(bsc#1124064)
+        log.info "/boot/grub2/grub.cfg is missing. Defaulting to empty one."
       end
       @sections = ::Bootloader::Sections.new(grub_cfg)
       log.info "grub sections: #{@sections.all}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-4.1.16/test/grub2base_test.rb 
new/yast2-bootloader-4.1.17/test/grub2base_test.rb
--- old/yast2-bootloader-4.1.16/test/grub2base_test.rb  2019-02-08 
11:18:31.000000000 +0100
+++ new/yast2-bootloader-4.1.17/test/grub2base_test.rb  2019-02-14 
09:43:59.000000000 +0100
@@ -28,6 +28,14 @@
       subject.read
     end
 
+    it "use empty file as default if grub.cfg is missing" do
+      grub_cfg = double(::CFA::Grub2::GrubCfg)
+      allow(::CFA::Grub2::GrubCfg).to receive(:new).and_return(grub_cfg)
+      allow(grub_cfg).to receive(:load).and_raise(Errno::ENOENT)
+
+      expect { subject.read }.to_not raise_error
+    end
+
     it "reads trusted boot configuration from sysconfig" do
       mocked_sysconfig = ::Bootloader::Sysconfig.new(trusted_boot: true)
       allow(::Bootloader::Sysconfig).to 
receive(:from_system).and_return(mocked_sysconfig)


Reply via email to