Hello community,

here is the log from the commit of package yast2-bootloader for 
openSUSE:Factory checked in at 2017-03-29 13:22:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-bootloader (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-bootloader.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-bootloader"

Wed Mar 29 13:22:57 2017 rev:244 rq:482535 version:3.2.18

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-bootloader/yast2-bootloader.changes        
2017-02-04 16:52:24.598274559 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-bootloader.new/yast2-bootloader.changes   
2017-03-29 13:23:03.241328627 +0200
@@ -1,0 +2,23 @@
+Fri Mar 24 14:17:00 UTC 2017 - [email protected]
+
+- Report user friendly message when no root partition is detected
+  instead of internal error. (bsc#1029293)
+- 3.2.18
+
+-------------------------------------------------------------------
+Wed Mar  1 17:42:18 UTC 2017 - [email protected]
+
+- provide more helpful error message when invalid arguments for
+  serial console are provided (bsc#1012383)
+- 3.2.17
+
+-------------------------------------------------------------------
+Wed Mar  1 16:42:18 UTC 2017 - [email protected]
+
+- propose for xen hypervisor vga parameter if framebuffer is used
+  ( should fix issue with text only environment when fbdev driver
+  is used )
+  (FATE#322200)
+- 3.2.16
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.1dePso/_old  2017-03-29 13:23:05.477012447 +0200
+++ /var/tmp/diff_new_pack.1dePso/_new  2017-03-29 13:23:05.477012447 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        3.2.15
+Version:        3.2.18
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-bootloader-3.2.15.tar.bz2 -> yast2-bootloader-3.2.18.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.2.15/package/yast2-bootloader.changes 
new/yast2-bootloader-3.2.18/package/yast2-bootloader.changes
--- old/yast2-bootloader-3.2.15/package/yast2-bootloader.changes        
2017-01-30 16:16:35.911538944 +0100
+++ new/yast2-bootloader-3.2.18/package/yast2-bootloader.changes        
2017-03-24 16:41:55.807983895 +0100
@@ -1,4 +1,27 @@
 -------------------------------------------------------------------
+Fri Mar 24 14:17:00 UTC 2017 - [email protected]
+
+- Report user friendly message when no root partition is detected
+  instead of internal error. (bsc#1029293)
+- 3.2.18
+
+-------------------------------------------------------------------
+Wed Mar  1 17:42:18 UTC 2017 - [email protected]
+
+- provide more helpful error message when invalid arguments for
+  serial console are provided (bsc#1012383)
+- 3.2.17
+
+-------------------------------------------------------------------
+Wed Mar  1 16:42:18 UTC 2017 - [email protected]
+
+- propose for xen hypervisor vga parameter if framebuffer is used
+  ( should fix issue with text only environment when fbdev driver
+  is used )
+  (FATE#322200)
+- 3.2.16
+
+-------------------------------------------------------------------
 Wed Jan 25 12:57:38 UTC 2017 - [email protected]
 
 - Implement simple_mode -> label_proposal (FATE#322328)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.2.15/package/yast2-bootloader.spec 
new/yast2-bootloader-3.2.18/package/yast2-bootloader.spec
--- old/yast2-bootloader-3.2.15/package/yast2-bootloader.spec   2017-01-30 
16:16:35.911538944 +0100
+++ new/yast2-bootloader-3.2.18/package/yast2-bootloader.spec   2017-03-24 
16:41:55.807983895 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        3.2.15
+Version:        3.2.18
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.2.15/src/lib/bootloader/exceptions.rb 
new/yast2-bootloader-3.2.18/src/lib/bootloader/exceptions.rb
--- old/yast2-bootloader-3.2.15/src/lib/bootloader/exceptions.rb        
2017-01-30 16:16:36.043538944 +0100
+++ new/yast2-bootloader-3.2.18/src/lib/bootloader/exceptions.rb        
2017-03-24 16:41:55.811983895 +0100
@@ -25,4 +25,15 @@
         "Please use YaST2 bootloader to fix it. Details: %s") % msg
     end
   end
+
+  # Represents error when serial console arguments are not valid
+  class InvalidSerialConsoleArguments < BrokenConfiguration
+    MESSAGE = "Invalid serial console arguments".freeze
+    def initialize(msg = MESSAGE)
+      super
+    end
+  end
+
+  class NoRoot < RuntimeError
+  end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.2.15/src/lib/bootloader/grub2_widgets.rb 
new/yast2-bootloader-3.2.18/src/lib/bootloader/grub2_widgets.rb
--- old/yast2-bootloader-3.2.15/src/lib/bootloader/grub2_widgets.rb     
2017-01-30 16:16:36.071538944 +0100
+++ new/yast2-bootloader-3.2.18/src/lib/bootloader/grub2_widgets.rb     
2017-03-24 16:41:55.811983895 +0100
@@ -2,6 +2,7 @@
 
 require "bootloader/generic_widgets"
 require "bootloader/device_map_dialog"
+require "bootloader/serial_console"
 require "cfa/matcher"
 
 Yast.import "BootStorage"
@@ -460,6 +461,22 @@
       )
     end
 
+    def help
+      # Translators: do not translate the quoted parts like "unit"
+      _(
+        "<p>When a graphical console is used it allows to use various " \
+        "display resolutions. The <tt>auto</tt> option tries to find " \
+        "the best one when booting starts.</p>\n" \
+        "<p>When a serial console is used the boot output " \
+        "will be printed to a serial device like <tt>ttyS0</tt>. " \
+        "At least the <tt>--unit</tt> option has to be specified, " \
+        "and the complete syntax is <tt>%s</tt>. " \
+        "Other parts are optional and if not set, a default is used. " \
+        "<tt>NUM</tt> in commands stands for a positive number like 8. " \
+        "Example parameters are <tt>serial --speed=38400 --unit=0</tt>.</p>"
+      ) % syntax
+    end
+
     def init
       enable = grub_default.terminal == :serial
       Yast::UI.ChangeWidget(Id(:console_frame), :Value, enable)
@@ -488,6 +505,14 @@
           Yast::UI.SetFocus(Id(:console_args))
           return false
         end
+        if 
::Bootloader::SerialConsole.load_from_console_args(console_value).nil?
+          # Translators: do not translate "unit"
+          msg = _("To enable the serial console you must provide the 
corresponding arguments.\n" \
+          "The \"unit\" argument is required, the complete syntax is:\n%s") % 
syntax
+          Yast::Report.Error(msg)
+          Yast::UI.SetFocus(Id(:console_args))
+          return false
+        end
       end
       true
     end
@@ -533,6 +558,16 @@
 
   private
 
+    # Explanation for help and error messages
+    def syntax
+      # Translators: NUM is an abbreviation for "number",
+      # to be substituted in a command like
+      # "serial --unit=NUM --speed=NUM --parity={odd|even|no} --word=NUM 
--stop=NUM"
+      # so do not use punctuation
+      n = _("NUM")
+      "serial --unit=#{n} --speed=#{n} --parity={odd|even|no} --word=#{n} 
--stop=#{n}"
+    end
+
     def graphical_console_frame
       CheckBoxFrame(
         Id(:gfxterm_frame),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.2.15/src/lib/bootloader/grub2base.rb 
new/yast2-bootloader-3.2.18/src/lib/bootloader/grub2base.rb
--- old/yast2-bootloader-3.2.15/src/lib/bootloader/grub2base.rb 2017-01-30 
16:16:36.071538944 +0100
+++ new/yast2-bootloader-3.2.18/src/lib/bootloader/grub2base.rb 2017-03-24 
16:41:55.811983895 +0100
@@ -3,6 +3,7 @@
 require "yast2/execute"
 require "yast2/target_file" # adds ability to work with cfa in inst-sys
 require "bootloader/bootloader_base"
+require "bootloader/exceptions"
 require "bootloader/sections"
 require "bootloader/grub2pwd"
 require "bootloader/udev_mapping"
@@ -119,6 +120,7 @@
       grub_default.generic_set("SUSE_BTRFS_SNAPSHOT_BOOTING", "true")
 
       propose_serial
+      propose_xen_hypervisor
 
       nil
     end
@@ -134,7 +136,7 @@
 
     def enable_serial_console(console)
       console = SerialConsole.load_from_console_args(console)
-      raise "Invalid console parameters" unless console
+      raise ::Bootloader::InvalidSerialConsoleArguments unless console
 
       grub_default.serial_console = console.console_args
 
@@ -269,6 +271,14 @@
       grub_default.serial_console = console.console_args
     end
 
+    def propose_xen_hypervisor
+      return if Dir["/dev/fb*"].empty?
+
+      matcher = CFA::Matcher.new(key: "vga")
+      placer = CFA::ReplacePlacer.new(matcher)
+      grub_default.xen_hypervisor_params.add_parameter("vga", 
"gfx-1024x768x16", placer)
+    end
+
     def propose_resume
       swap_parts = Yast::BootStorage.available_swap_partitions
       largest_swap_part = (swap_parts.max_by { |_part, size| size } || 
[""]).first
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.2.15/src/lib/bootloader/proposal_client.rb 
new/yast2-bootloader-3.2.18/src/lib/bootloader/proposal_client.rb
--- old/yast2-bootloader-3.2.15/src/lib/bootloader/proposal_client.rb   
2017-01-30 16:16:36.107538944 +0100
+++ new/yast2-bootloader-3.2.18/src/lib/bootloader/proposal_client.rb   
2017-03-24 16:41:55.811983895 +0100
@@ -1,4 +1,5 @@
 require "installation/proposal_client"
+require "bootloader/exceptions"
 require "bootloader/main_dialog"
 require "bootloader/bootloader_factory"
 
@@ -62,6 +63,12 @@
       Yast::PackagesProposal.AddResolvables("yast2-bootloader", :package, 
bl.packages)
 
       construct_proposal_map
+    rescue ::Bootloader::NoRoot
+      {
+        "label_proposal" => [],
+        "warning_level"  => :fatal,
+        "warning"        => _("Cannot detect device mounted as root. Please 
check partitioning.")
+      }
     end
 
     def ask_user(param)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.2.15/src/modules/BootStorage.rb 
new/yast2-bootloader-3.2.18/src/modules/BootStorage.rb
--- old/yast2-bootloader-3.2.15/src/modules/BootStorage.rb      2017-01-30 
16:16:36.183538944 +0100
+++ new/yast2-bootloader-3.2.18/src/modules/BootStorage.rb      2017-03-24 
16:41:55.815983895 +0100
@@ -19,6 +19,7 @@
 #
 require "yast"
 require "bootloader/udev_mapping"
+require "bootloader/exceptions"
 
 module Yast
   class BootStorageClass < Module
@@ -199,7 +200,7 @@
       log.info "mountdata_boot #{mountdata_boot}"
 
       @RootPartitionDevice = mountdata_root ? mountdata_root.first || "" : ""
-      raise "No mountpoint for / !!" if @RootPartitionDevice.empty?
+      raise ::Bootloader::NoRoot, "Missing '/' mount point" if 
@RootPartitionDevice.empty?
 
       # if /boot changed, re-configure location
       @BootPartitionDevice = mountdata_boot.first
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.2.15/test/boot_storage_test.rb 
new/yast2-bootloader-3.2.18/test/boot_storage_test.rb
--- old/yast2-bootloader-3.2.15/test/boot_storage_test.rb       2017-01-30 
16:16:36.219538944 +0100
+++ new/yast2-bootloader-3.2.18/test/boot_storage_test.rb       2017-03-24 
16:41:55.815983895 +0100
@@ -79,7 +79,7 @@
     it "raises exception if there is no mount point for root" do
       allow(Yast::Storage).to receive(:GetMountPoints).and_return({})
 
-      expect { subject.detect_disks }.to raise_error(RuntimeError)
+      expect { subject.detect_disks }.to raise_error(::Bootloader::NoRoot)
     end
 
     it "sets BootStorage.mbr_disk" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.2.15/test/grub2_widgets_test.rb 
new/yast2-bootloader-3.2.18/test/grub2_widgets_test.rb
--- old/yast2-bootloader-3.2.15/test/grub2_widgets_test.rb      2017-01-30 
16:16:36.319538944 +0100
+++ new/yast2-bootloader-3.2.18/test/grub2_widgets_test.rb      2017-03-24 
16:41:55.823983895 +0100
@@ -483,7 +483,7 @@
 
     it "is valid if serial console arguments are provided" do
       stub_widget_value(:console_frame, true)
-      stub_widget_value(:console_args, "console=ttyS0,9600n8")
+      stub_widget_value(:console_args, "serial --unit=0 --speed=9600 
--parity=no --stop=8")
 
       expect(subject.validate).to eq true
     end
@@ -496,6 +496,16 @@
       expect(Yast::UI).to receive(:SetFocus).with(Id(:console_args))
       expect(subject.validate).to eq false
     end
+
+    it "reports an error if serial console is not correct" do
+      stub_widget_value(:console_frame, true)
+      stub_widget_value(:console_args, "serial --speed=5")
+
+      expect(Yast::Report).to receive(:Error)
+      expect(Yast::UI).to receive(:SetFocus).with(Id(:console_args))
+      expect(subject.validate).to eq false
+    end
+
   end
 
   context "initialization" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.2.15/test/grub2base_test.rb 
new/yast2-bootloader-3.2.18/test/grub2base_test.rb
--- old/yast2-bootloader-3.2.15/test/grub2base_test.rb  2017-01-30 
16:16:36.331538944 +0100
+++ new/yast2-bootloader-3.2.18/test/grub2base_test.rb  2017-03-24 
16:41:55.823983895 +0100
@@ -310,6 +310,24 @@
       end
     end
 
+    context "xen hyperviser kernel parameters proposal" do
+      it "do nothing if there is no framebuffer" do
+        allow(Dir).to receive(:[]).and_return([])
+
+        subject.propose
+
+        expect(subject.grub_default.xen_hypervisor_params.parameter("vga")).to 
eq false
+      end
+
+      it "propose vga parameter if there is framebuffer" do
+        allow(Dir).to receive(:[]).and_return(["/dev/fb0"])
+
+        subject.propose
+
+        expect(subject.grub_default.xen_hypervisor_params.parameter("vga")).to 
eq "gfx-1024x768x16"
+      end
+    end
+
     it "proposes gfx mode to auto" do
       subject.propose
 


Reply via email to