Hello community,

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

Package is "yast2-kdump"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-kdump/yast2-kdump.changes  2015-10-20 
16:21:35.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-kdump.new/yast2-kdump.changes     
2015-11-08 11:25:22.000000000 +0100
@@ -1,0 +2,6 @@
+Tue Nov  3 09:44:53 UTC 2015 - [email protected]
+
+- manage the value of the fadump kernel param (bsc#951212)
+- 3.1.34
+
+-------------------------------------------------------------------

Old:
----
  yast2-kdump-3.1.33.tar.bz2

New:
----
  yast2-kdump-3.1.34.tar.bz2

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

Other differences:
------------------
++++++ yast2-kdump.spec ++++++
--- /var/tmp/diff_new_pack.n09U9R/_old  2015-11-08 11:25:23.000000000 +0100
+++ /var/tmp/diff_new_pack.n09U9R/_new  2015-11-08 11:25:23.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-kdump
-Version:        3.1.33
+Version:        3.1.34
 Release:        0
 Summary:        Configuration of kdump
 License:        GPL-2.0

++++++ yast2-kdump-3.1.33.tar.bz2 -> yast2-kdump-3.1.34.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.33/package/yast2-kdump.changes 
new/yast2-kdump-3.1.34/package/yast2-kdump.changes
--- old/yast2-kdump-3.1.33/package/yast2-kdump.changes  2015-10-12 
15:34:12.000000000 +0200
+++ new/yast2-kdump-3.1.34/package/yast2-kdump.changes  2015-11-04 
15:14:23.000000000 +0100
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Tue Nov  3 09:44:53 UTC 2015 - [email protected]
+
+- manage the value of the fadump kernel param (bsc#951212)
+- 3.1.34
+
+-------------------------------------------------------------------
 Mon Oct 12 12:17:16 UTC 2015 - [email protected]
 
 - when fadump changed write show popup that reboot is needed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.33/package/yast2-kdump.spec 
new/yast2-kdump-3.1.34/package/yast2-kdump.spec
--- old/yast2-kdump-3.1.33/package/yast2-kdump.spec     2015-10-12 
15:34:12.000000000 +0200
+++ new/yast2-kdump-3.1.34/package/yast2-kdump.spec     2015-11-04 
15:14:23.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-kdump
-Version:        3.1.33
+Version:        3.1.34
 Release:        0
 Summary:        Configuration of kdump
 License:        GPL-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.33/src/modules/Kdump.rb 
new/yast2-kdump-3.1.34/src/modules/Kdump.rb
--- old/yast2-kdump-3.1.33/src/modules/Kdump.rb 2015-10-12 15:34:12.000000000 
+0200
+++ new/yast2-kdump-3.1.34/src/modules/Kdump.rb 2015-11-04 15:14:23.000000000 
+0100
@@ -448,13 +448,19 @@
       true
     end
 
-    # Write kdump boot argument crashkernel
+    # Write kdump boot arguments - crashkernel and fadump
     # set kdump start at boot
     #
     #  @return [Boolean] successfull
     def WriteKdumpBootParameter
       old_progress = false
+      reboot_needed = using_fadump_changed?
 
+      # First, write or remove the fadump param if needed
+      write_fadump_boot_param
+
+      # Then, do the same for the crashkernel param
+      #
       # If we need to add crashkernel param
       if @add_crashkernel_param
         if Mode.autoinst || Mode.autoupgrade
@@ -467,7 +473,7 @@
           crash_values = crash_kernel_values
           remove_offsets!(crash_values) if Mode.update
           # Skip writing of param if it's already set to the desired values
-          skip_crash_values = @crashkernel_param && @crashkernel_param_values 
== crash_values && !using_fadump_changed?
+          skip_crash_values = @crashkernel_param && @crashkernel_param_values 
== crash_values
         end
 
         if skip_crash_values
@@ -483,9 +489,7 @@
             "[kdump] (WriteKdumpBootParameter) adding chrashkernel options 
with values: %1",
             crash_values
           )
-          if Mode.normal
-            Popup.Message(_("To apply changes a reboot is necessary."))
-          end
+          reboot_needed = true
           Service.Enable(KDUMP_SERVICE_NAME)
         end
       else
@@ -496,14 +500,16 @@
           old_progress = Progress.set(false)
           Bootloader.Write
           Progress.set(old_progress)
-          if Mode.normal
-            Popup.Message(_("To apply changes a reboot is necessary."))
-          end
+          reboot_needed = true
         end
         Service.Disable(KDUMP_SERVICE_NAME)
         Service.Stop(KDUMP_SERVICE_NAME) if Service.active?(KDUMP_SERVICE_NAME)
       end
 
+      if reboot_needed && Mode.normal
+        Popup.Message(_("To apply changes a reboot is necessary."))
+      end
+
       true
     end
 
@@ -639,7 +645,7 @@
         return false
       end
 
-      # write/delete bootloader option for kernel "crashkernel"
+      # write/delete bootloader options for kernel - "crashkernel" and "fadump"
       return false if Abort()
       Progress.NextStage
       # Error message
@@ -1133,6 +1139,19 @@
         end
       end
     end
+
+    def write_fadump_boot_param
+      if fadump_supported?
+        # If fdump is selected and we want to enable kdump
+        if using_fadump? && @add_crashkernel_param
+            value = "on"
+        else
+            value = nil
+        end
+        Bootloader.modify_kernel_params(:common, :xen_guest, :recovery, 
"fadump" => value)
+        Bootloader.Write
+      end
+    end
   end
 
   Kdump = KdumpClass.new
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.33/test/kdump_test.rb 
new/yast2-kdump-3.1.34/test/kdump_test.rb
--- old/yast2-kdump-3.1.33/test/kdump_test.rb   2015-10-12 15:34:12.000000000 
+0200
+++ new/yast2-kdump-3.1.34/test/kdump_test.rb   2015-11-04 15:14:23.000000000 
+0100
@@ -8,6 +8,7 @@
 Yast.import "Service"
 Yast.import "Popup"
 Yast.import "SpaceCalculation"
+Yast.import "Arch"
 
 describe Yast::Kdump do
   before do
@@ -366,6 +367,8 @@
   describe ".WriteKdumpBootParameter" do
     before do
       Yast::Mode.SetMode(mode)
+      # FIXME: current tests do not cover fadump (ppc64 specific)
+      allow(Yast::Arch).to receive(:ppc64).and_return false
     end
 
     context "during autoinstallation" do


Reply via email to