Hello community,

here is the log from the commit of package yast2-bootloader for 
openSUSE:Factory checked in at 2018-04-26 13:31:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-bootloader (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-bootloader.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-bootloader"

Thu Apr 26 13:31:44 2018 rev:259 rq:600987 version:4.0.27

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-bootloader/yast2-bootloader.changes        
2018-03-26 12:13:43.251909606 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-bootloader.new/yast2-bootloader.changes   
2018-04-26 13:31:45.861858697 +0200
@@ -1,0 +2,21 @@
+Tue Apr 24 14:36:12 UTC 2018 - [email protected]
+
+- Do not crash when clicking on booting during upgrade
+  (bsc#1070233)
+- 4.0.27
+
+-------------------------------------------------------------------
+Tue Apr 24 12:44:12 UTC 2018 - [email protected]
+
+- Propose net.ifnames boot parameter if it is used for installation
+  on s390 (bsc#1086665)
+- 4.0.26
+
+-------------------------------------------------------------------
+Tue Apr 24 08:30:10 UTC 2018 - [email protected]
+
+- Show understandable popup when grub2 terminal option contain
+  complex string that is not yet supported (bsc#1053559)
+- 4.0.25
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.GuxR1e/_old  2018-04-26 13:31:46.477836131 +0200
+++ /var/tmp/diff_new_pack.GuxR1e/_new  2018-04-26 13:31:46.481835985 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        4.0.24
+Version:        4.0.27
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-bootloader-4.0.24.tar.bz2 -> yast2-bootloader-4.0.27.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.0.24/package/yast2-bootloader.changes 
new/yast2-bootloader-4.0.27/package/yast2-bootloader.changes
--- old/yast2-bootloader-4.0.24/package/yast2-bootloader.changes        
2018-03-21 12:40:13.000000000 +0100
+++ new/yast2-bootloader-4.0.27/package/yast2-bootloader.changes        
2018-04-25 13:37:03.000000000 +0200
@@ -1,9 +1,30 @@
 -------------------------------------------------------------------
+Tue Apr 24 14:36:12 UTC 2018 - [email protected]
+
+- Do not crash when clicking on booting during upgrade
+  (bsc#1070233)
+- 4.0.27
+
+-------------------------------------------------------------------
+Tue Apr 24 12:44:12 UTC 2018 - [email protected]
+
+- Propose net.ifnames boot parameter if it is used for installation
+  on s390 (bsc#1086665)
+- 4.0.26
+
+-------------------------------------------------------------------
+Tue Apr 24 08:30:10 UTC 2018 - [email protected]
+
+- Show understandable popup when grub2 terminal option contain
+  complex string that is not yet supported (bsc#1053559)
+- 4.0.25
+
+-------------------------------------------------------------------
 Wed Mar 21 11:33:54 UTC 2018 - [email protected]
 
 - bnc#1083938
   - missing translation
-- 4.0.24 
+- 4.0.24
 
 -------------------------------------------------------------------
 Tue Mar 20 12:32:44 UTC 2018 - [email protected]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.0.24/package/yast2-bootloader.spec 
new/yast2-bootloader-4.0.27/package/yast2-bootloader.spec
--- old/yast2-bootloader-4.0.24/package/yast2-bootloader.spec   2018-03-21 
12:40:13.000000000 +0100
+++ new/yast2-bootloader-4.0.27/package/yast2-bootloader.spec   2018-04-25 
13:37:03.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        4.0.24
+Version:        4.0.27
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.0.24/src/lib/bootloader/config_dialog.rb 
new/yast2-bootloader-4.0.27/src/lib/bootloader/config_dialog.rb
--- old/yast2-bootloader-4.0.24/src/lib/bootloader/config_dialog.rb     
2018-03-21 12:40:13.000000000 +0100
+++ new/yast2-bootloader-4.0.27/src/lib/bootloader/config_dialog.rb     
2018-04-25 13:37:03.000000000 +0200
@@ -19,11 +19,17 @@
 
     def run
       guarded_run
-    rescue ::Bootloader::BrokenConfiguration => e
-      ret = Yast::Report.AnyQuestion(_("Broken Configuration"),
+    rescue ::Bootloader::BrokenConfiguration, ::Bootloader::UnsupportedOption 
=> e
+      msg = if e.is_a?(::Bootloader::BrokenConfiguration)
         # TRANSLATORS: %s stands for readon why yast cannot process it
         _("YaST cannot process current bootloader configuration (%s). " \
-          "Propose new configuration from scratch?") % e.reason,
+          "Propose new configuration from scratch?") % e.reason
+      else
+        e.message
+      end
+
+      ret = Yast::Report.AnyQuestion(_("Unsupported Configuration"),
+        msg,
         _("Propose"),
         _("Quit"),
         :yes) # focus proposing new one
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.0.24/src/lib/bootloader/exceptions.rb 
new/yast2-bootloader-4.0.27/src/lib/bootloader/exceptions.rb
--- old/yast2-bootloader-4.0.24/src/lib/bootloader/exceptions.rb        
2018-03-21 12:40:13.000000000 +0100
+++ new/yast2-bootloader-4.0.27/src/lib/bootloader/exceptions.rb        
2018-04-25 13:37:03.000000000 +0200
@@ -26,6 +26,23 @@
     end
   end
 
+  # Represent unsupported value in given option. Used mainly when value 
contain something that
+  # bootloader does not understand yet.
+  class UnsupportedOption < RuntimeError
+    include Yast::I18n
+    attr_reader :option
+
+    def initialize(option)
+      @reason = option
+      textdomain "bootloader"
+
+      # TRANSLATORS: %s is name of option that has unsupported value
+      super _("Option '%s' contains an unrecognized value.\nYaST Bootloader 
cannot handle it.\n" \
+        "Either the whole bootloader configuration needs to be proposed 
again\n" \
+        "or YaST must quit and you can edit it manually.") % option
+    end
+  end
+
   # Represents error when serial console arguments are not valid
   class InvalidSerialConsoleArguments < BrokenConfiguration
     MESSAGE = "Invalid serial console arguments".freeze
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.0.24/src/lib/bootloader/grub2_widgets.rb 
new/yast2-bootloader-4.0.27/src/lib/bootloader/grub2_widgets.rb
--- old/yast2-bootloader-4.0.24/src/lib/bootloader/grub2_widgets.rb     
2018-03-21 12:40:13.000000000 +0100
+++ new/yast2-bootloader-4.0.27/src/lib/bootloader/grub2_widgets.rb     
2018-04-25 13:37:03.000000000 +0200
@@ -497,6 +497,10 @@
       Yast::UI.ChangeWidget(Id(:gfxmode), :Value, mode) if mode && mode != ""
 
       Yast::UI.ChangeWidget(Id(:theme), :Value, grub_default.theme || "")
+    # FIXME: just temporary workaround for terminal that does contain
+    # more complex string (bsc#1053559)
+    rescue RuntimeError
+      raise ::Bootloader::UnsupportedOption, "GRUB_TERMINAL"
     end
 
     def validate
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.0.24/src/lib/bootloader/grub2base.rb 
new/yast2-bootloader-4.0.27/src/lib/bootloader/grub2base.rb
--- old/yast2-bootloader-4.0.24/src/lib/bootloader/grub2base.rb 2018-03-21 
12:40:13.000000000 +0100
+++ new/yast2-bootloader-4.0.27/src/lib/bootloader/grub2base.rb 2018-04-25 
13:37:03.000000000 +0200
@@ -171,12 +171,7 @@
 
       log.info "System language is #{lang}"
 
-      {
-        "LC_MESSAGES" => nil,
-        "LC_ALL"      => nil,
-        "LANGUAGE"    => nil,
-        "LANG"        => lang
-      }
+      { "LC_MESSAGES" => nil, "LC_ALL" => nil, "LANGUAGE" => nil, "LANG" => 
lang }
     end
 
     def merge_pmbr_action(other)
@@ -217,11 +212,17 @@
     end
 
     def merge_attributes(default, other)
-      # string attributes
-      [:serial_console, :terminal, :timeout, :hidden_timeout, :distributor,
-       :gfxmode, :theme, :default].each do |attr|
-        val = other.public_send(attr)
-        default.public_send((attr.to_s + "=").to_sym, val) if val
+      begin
+        # string attributes
+        [:serial_console, :terminal, :timeout, :hidden_timeout, :distributor,
+         :gfxmode, :theme, :default].each do |attr|
+          val = other.public_send(attr)
+          default.public_send((attr.to_s + "=").to_sym, val) if val
+        end
+      # FIXME: only temporary solution to catch too complex grub terminal 
option (bsc#1053559)
+      # will be removed when cfa_grub2 and yast understand more complex 
terminal configuration
+      rescue RuntimeError
+        raise ::Bootloader::UnsupportedOption, "GRUB_TERMINAL"
       end
 
       # specific attributes that are not part of cfa
@@ -257,7 +258,11 @@
     end
 
     def propose_terminal
-      return if grub_default.terminal
+      begin
+        return if grub_default.terminal
+      rescue RuntimeError => e
+        log.info "Proposing terminal again due to #{e}"
+      end
 
       # for ppc: Boards with graphics are rare and those are PowerNV, where
       # modules are not used, see bsc#911682
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.0.24/src/lib/bootloader/proposal_client.rb 
new/yast2-bootloader-4.0.27/src/lib/bootloader/proposal_client.rb
--- old/yast2-bootloader-4.0.24/src/lib/bootloader/proposal_client.rb   
2018-03-21 12:40:13.000000000 +0100
+++ new/yast2-bootloader-4.0.27/src/lib/bootloader/proposal_client.rb   
2018-04-25 13:37:03.000000000 +0200
@@ -2,6 +2,7 @@
 require "bootloader/exceptions"
 require "bootloader/main_dialog"
 require "bootloader/bootloader_factory"
+require "yast2/popup"
 
 module Bootloader
   # Proposal client for bootloader configuration
@@ -71,6 +72,18 @@
     end
 
     def ask_user(param)
+      if Yast::Mode.update
+        current_bl = ::Bootloader::BootloaderFactory.current
+
+        # we upgrading grub2, so no change there
+        if grub2_update?(current_bl)
+          ::Yast2::Popup.show(
+            # TRANSLATORS: popup text when user click on link and we forbid to 
continue
+            _("Changing the bootloader configuration during an upgrade is not 
supported.")
+          )
+          return { "workflow_sequence" => :cancel }
+        end
+      end
       chosen_id = param["chosen_id"]
       result = :next
       log.info "ask user called with #{chosen_id}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-4.0.24/src/modules/BootArch.rb 
new/yast2-bootloader-4.0.27/src/modules/BootArch.rb
--- old/yast2-bootloader-4.0.24/src/modules/BootArch.rb 2018-03-21 
12:40:13.000000000 +0100
+++ new/yast2-bootloader-4.0.27/src/modules/BootArch.rb 2018-04-25 
13:37:03.000000000 +0200
@@ -57,6 +57,11 @@
           "hvc_iucv=8 TERM=dumb"
         end
         parameters = "#{features} #{termparm}"
+        # pick selected params from installation command line (bsc#1086665)
+        if kernel_cmdline =~ /(net\.ifnames=\S*)/
+          parameters << " #{Regexp.last_match(1)}"
+        end
+
         parameters << " resume=#{resume}" unless resume.empty?
         return parameters
       else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-4.0.24/src/modules/Bootloader.rb 
new/yast2-bootloader-4.0.27/src/modules/Bootloader.rb
--- old/yast2-bootloader-4.0.24/src/modules/Bootloader.rb       2018-03-21 
12:40:13.000000000 +0100
+++ new/yast2-bootloader-4.0.27/src/modules/Bootloader.rb       2018-04-25 
13:37:03.000000000 +0200
@@ -145,11 +145,18 @@
 
         ::Bootloader::BootloaderFactory.current = 
::Bootloader::BootloaderFactory.proposed
         ::Bootloader::BootloaderFactory.current.propose
-      rescue ::Bootloader::BrokenConfiguration => e
-        ret = Yast::Report.AnyQuestion(_("Broken Configuration"),
+      rescue ::Bootloader::BrokenConfiguration, 
::Bootloader::UnsupportedOption => e
+        msg = if e.is_a?(::Bootloader::BrokenConfiguration)
           # TRANSLATORS: %s stands for readon why yast cannot process it
           _("YaST cannot process current bootloader configuration (%s). " \
-            "Propose new configuration from scratch?") % e.reason,
+            "Propose new configuration from scratch?") % e.reason
+        else
+          e.message
+        end
+
+        ret = Yast::Report.AnyQuestion(_("Unsupported Configuration"),
+          # TRANSLATORS: %s stands for readon why yast cannot process it
+          msg,
           _("Propose"),
           _("Quit"),
           :yes) # focus proposing new one
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-4.0.24/test/boot_arch_test.rb 
new/yast2-bootloader-4.0.27/test/boot_arch_test.rb
--- old/yast2-bootloader-4.0.24/test/boot_arch_test.rb  2018-03-21 
12:40:13.000000000 +0100
+++ new/yast2-bootloader-4.0.27/test/boot_arch_test.rb  2018-04-25 
13:37:03.000000000 +0200
@@ -104,8 +104,14 @@
         expect(subject.DefaultKernelParams("/dev/dasd2")).to 
include("resume=/dev/dasd2")
       end
 
-      # JR: temporary disabled as it cause build service only failure
-      it "does not add parameters from boot command line"
+      it "adds net.ifnames if boot command line contains it" do
+        allow(Yast::Kernel).to receive(:GetCmdLine).and_return("danger kill=1 
murder=allowed net.ifnames=1 anarchy=0")
+        expect(subject.DefaultKernelParams("/dev/dasd2")).to 
include("net.ifnames=1")
+        expect(subject.DefaultKernelParams("/dev/dasd2")).to_not 
include("danger")
+        expect(subject.DefaultKernelParams("/dev/dasd2")).to_not 
include("kill=1")
+        expect(subject.DefaultKernelParams("/dev/dasd2")).to_not 
include("murder=allowed")
+        expect(subject.DefaultKernelParams("/dev/dasd2")).to_not 
include("anarchy=0")
+      end
     end
 
     context "on POWER archs" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.0.24/test/bootloader_proposal_client_test.rb 
new/yast2-bootloader-4.0.27/test/bootloader_proposal_client_test.rb
--- old/yast2-bootloader-4.0.24/test/bootloader_proposal_client_test.rb 
2018-03-21 12:40:13.000000000 +0100
+++ new/yast2-bootloader-4.0.27/test/bootloader_proposal_client_test.rb 
2018-04-25 13:37:03.000000000 +0200
@@ -82,6 +82,17 @@
 
         subject.ask_user({})
       end
+
+      it "shows unsupported popup when upgrading from grub2 (bsc#1070233)" 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(:Export)
+        expect(Yast2::Popup).to receive(:show)
+        subject.ask_user({})
+      end
     end
   end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-4.0.24/test/grub2_widgets_test.rb 
new/yast2-bootloader-4.0.27/test/grub2_widgets_test.rb
--- old/yast2-bootloader-4.0.24/test/grub2_widgets_test.rb      2018-03-21 
12:40:13.000000000 +0100
+++ new/yast2-bootloader-4.0.27/test/grub2_widgets_test.rb      2018-04-25 
13:37:03.000000000 +0200
@@ -557,6 +557,12 @@
 
       subject.init
     end
+
+    it "raises UnsupportedOption if terminal is complex expression" do
+      allow(bootloader.grub_default).to 
receive(:terminal).and_raise(RuntimeError)
+
+      expect { subject.init }.to raise_error(::Bootloader::UnsupportedOption)
+    end
   end
 
   context "event handling" do


Reply via email to