Hello community,

here is the log from the commit of package yast2-bootloader for 
openSUSE:Factory checked in at 2015-10-25 15:11:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-bootloader (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-bootloader.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-bootloader"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-bootloader/yast2-bootloader.changes        
2015-10-20 16:22:10.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-bootloader.new/yast2-bootloader.changes   
2015-10-25 15:11:27.000000000 +0100
@@ -1,0 +2,14 @@
+Fri Oct 23 13:16:59 UTC 2015 - jreidin...@suse.com
+
+- respect original grub2 configuration when upgrade from grub2
+  to grub2 (bnc#951731)
+- 3.1.159
+
+-------------------------------------------------------------------
+Mon Oct 19 16:10:34 UTC 2015 - jreidin...@suse.com
+
+- do not modify bootloader configuration during offline upgrade
+  from grub2 to grub2 (bnc#950695,bnc#950162)
+- 3.1.158
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.xxIXx1/_old  2015-10-25 15:11:28.000000000 +0100
+++ /var/tmp/diff_new_pack.xxIXx1/_new  2015-10-25 15:11:28.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        3.1.157
+Version:        3.1.159
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-bootloader-3.1.157.tar.bz2 -> yast2-bootloader-3.1.159.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.157/package/yast2-bootloader.changes 
new/yast2-bootloader-3.1.159/package/yast2-bootloader.changes
--- old/yast2-bootloader-3.1.157/package/yast2-bootloader.changes       
2015-10-16 15:32:16.000000000 +0200
+++ new/yast2-bootloader-3.1.159/package/yast2-bootloader.changes       
2015-10-23 15:32:11.000000000 +0200
@@ -1,4 +1,18 @@
 -------------------------------------------------------------------
+Fri Oct 23 13:16:59 UTC 2015 - jreidin...@suse.com
+
+- respect original grub2 configuration when upgrade from grub2
+  to grub2 (bnc#951731)
+- 3.1.159
+
+-------------------------------------------------------------------
+Mon Oct 19 16:10:34 UTC 2015 - jreidin...@suse.com
+
+- do not modify bootloader configuration during offline upgrade
+  from grub2 to grub2 (bnc#950695,bnc#950162)
+- 3.1.158
+
+-------------------------------------------------------------------
 Fri Oct 16 14:27:17 CEST 2015 - sch...@suse.de
 
 - Set StorageDevices flag disks_valid to true while cloning system
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.157/package/yast2-bootloader.spec 
new/yast2-bootloader-3.1.159/package/yast2-bootloader.spec
--- old/yast2-bootloader-3.1.157/package/yast2-bootloader.spec  2015-10-16 
15:32:16.000000000 +0200
+++ new/yast2-bootloader-3.1.159/package/yast2-bootloader.spec  2015-10-23 
15:32:11.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        3.1.157
+Version:        3.1.159
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.157/src/clients/inst_bootloader.rb 
new/yast2-bootloader-3.1.159/src/clients/inst_bootloader.rb
--- old/yast2-bootloader-3.1.157/src/clients/inst_bootloader.rb 2015-10-16 
15:32:16.000000000 +0200
+++ new/yast2-bootloader-3.1.159/src/clients/inst_bootloader.rb 2015-10-23 
15:32:11.000000000 +0200
@@ -30,6 +30,13 @@
         return :auto # don't execute this once more
       end
 
+      # for upgrade that is from grub2 to grub2 and user do not want
+      # any changes, just quit (bnc#951731)
+      if Mode.update && !(BootCommon.was_read || BootCommon.was_proposed)
+        Builtins.y2milestone("clean upgrade, do nothing")
+        return :auto
+      end
+
       # if BL config is created from scratch, prepare config files
       # in order not to touch old files (bnc#899743)
       if Mode.installation || !BootCommon.was_read
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.157/src/lib/bootloader/finish_client.rb 
new/yast2-bootloader-3.1.159/src/lib/bootloader/finish_client.rb
--- old/yast2-bootloader-3.1.157/src/lib/bootloader/finish_client.rb    
2015-10-16 15:32:17.000000000 +0200
+++ new/yast2-bootloader-3.1.159/src/lib/bootloader/finish_client.rb    
2015-10-23 15:32:11.000000000 +0200
@@ -48,12 +48,19 @@
       if !Yast::Mode.update
         retcode = Yast::Bootloader.WriteInstallation
       else
-        retcode = Yast::Bootloader.Update
+        # if we do not read nor propose that we have nothing to do
+        if Yast::BootCommon.was_read || Yast::BootCommon.was_proposed
+          retcode = Yast::Bootloader.Update
+        else
+          quick_exit = true
+        end
 
         # workaround for packages that forgot to update initrd(bnc#889616)
         # do not use Initrd module as it can also change configuration, which 
we do not want
         res = Yast::SCR.Execute(BASH_PATH, "/sbin/mkinitrd")
         log.info "Regerate initrd with result #{res}"
+
+        return true if quick_exit
       end
 
       # FIXME: workaround grub2 need manual rerun of branding due to overwrite 
by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.157/src/lib/bootloader/proposal_client.rb 
new/yast2-bootloader-3.1.159/src/lib/bootloader/proposal_client.rb
--- old/yast2-bootloader-3.1.157/src/lib/bootloader/proposal_client.rb  
2015-10-16 15:32:17.000000000 +0200
+++ new/yast2-bootloader-3.1.159/src/lib/bootloader/proposal_client.rb  
2015-10-23 15:32:11.000000000 +0200
@@ -44,7 +44,7 @@
       end
 
       if Yast::Mode.update
-        propose_for_update(force_reset)
+        return { "raw_proposal" => [_("do not change")] } unless 
propose_for_update(force_reset)
       else
         # in installation always propose missing stuff
         Yast::Bootloader.Propose
@@ -117,19 +117,11 @@
     end
 
     def propose_for_update(force_reset)
-      if ["grub2", "grub2-efi"].include? old_bootloader
+      if ["grub2", "grub2-efi"].include?(old_bootloader) &&
+          !Yast::BootCommon.was_proposed &&
+          !Yast::Bootloader.proposed_cfg_changed
         log.info "update of grub2, do not repropose"
-        if !Yast::BootCommon.was_read || force_reset
-          # SCR isn't pointing to /mnt yet but we'd really like to read
-          # the config files - so we're cheating a bit.
-          Yast::WFM.Execute(Path.new(".local.bash"),
-            "ln -s /mnt/boot/grub2 /boot; " \
-            "ln -s /mnt/etc/default/grub{,_installdevice} /etc/default; " \
-            "ln -s /mnt/etc/sysconfig/bootloader /etc/sysconfig"
-          )
-          Yast::Bootloader.blRead(true, true)
-          Yast::BootCommon.was_read = true
-        end
+        return false
       elsif old_bootloader == "none"
         log.info "Bootloader not configured, do not repropose"
         # blRead just exits for none bootloader
@@ -141,6 +133,8 @@
         Yast::Bootloader.Reset
         Yast::Bootloader.Propose
       end
+
+      true
     end
 
     def construct_proposal_map
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.1.157/src/modules/BootGRUB2.rb 
new/yast2-bootloader-3.1.159/src/modules/BootGRUB2.rb
--- old/yast2-bootloader-3.1.157/src/modules/BootGRUB2.rb       2015-10-16 
15:32:17.000000000 +0200
+++ new/yast2-bootloader-3.1.159/src/modules/BootGRUB2.rb       2015-10-23 
15:32:11.000000000 +0200
@@ -204,7 +204,8 @@
         line << "</li>"
       end
 
-      if ["boot_root", "boot_boot", "boot_mbr", "boot_extended"].none? { |loc| 
BootCommon.globals[loc] == "true" }
+      if ["boot_root", "boot_boot", "boot_mbr", "boot_extended"].none? { |loc| 
BootCommon.globals[loc] == "true" } &&
+          (BootCommon.globals["boot_custom"].nil? || 
BootCommon.globals["boot_custom"].empty?)
         # no location chosen, so warn user that it is problem unless he is sure
         msg = _("Warning: No location for bootloader stage1 selected." \
           "Unless you know what you are doing please select above location.")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.157/test/bootloader_finish_client_test.rb 
new/yast2-bootloader-3.1.159/test/bootloader_finish_client_test.rb
--- old/yast2-bootloader-3.1.157/test/bootloader_finish_client_test.rb  
2015-10-16 15:32:17.000000000 +0200
+++ new/yast2-bootloader-3.1.159/test/bootloader_finish_client_test.rb  
2015-10-23 15:32:11.000000000 +0200
@@ -19,6 +19,10 @@
       allow(Yast::Bootloader).to receive(:Read)
       allow(Yast::Bootloader).to receive(:FlagOnetimeBoot).and_return(true)
       allow(Yast::Bootloader).to 
receive(:getDefaultSection).and_return("linux")
+
+      Yast.import "BootCommon"
+
+      allow(Yast::BootCommon).to receive(:was_read).and_return(true)
     end
 
     it "sets on non-s390 systems reboot message" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.157/test/bootloader_proposal_client_test.rb 
new/yast2-bootloader-3.1.159/test/bootloader_proposal_client_test.rb
--- old/yast2-bootloader-3.1.157/test/bootloader_proposal_client_test.rb        
2015-10-16 15:32:17.000000000 +0200
+++ new/yast2-bootloader-3.1.159/test/bootloader_proposal_client_test.rb        
2015-10-23 15:32:11.000000000 +0200
@@ -166,16 +166,16 @@
       subject.make_proposal({})
     end
 
-    it "just read old configuration update if old bootloader is grub2" do
+    it "propose no change if old bootloader is grub2" do
       Yast.import "Mode"
       allow(Yast::Mode).to receive(:update).and_return(true)
 
       expect(subject).to receive("old_bootloader").and_return("grub2")
 
       expect(Yast::Bootloader).to_not receive(:Propose)
-      expect(Yast::Bootloader).to receive(:blRead)
+      expect(Yast::Bootloader).to_not receive(:blRead)
 
-      subject.make_proposal({})
+      expect(subject.make_proposal({})).to eq("raw_proposal" => ["do not 
change"])
     end
 
     it "resets configuration if not automode and force_reset passed" do


Reply via email to