Hello community,

here is the log from the commit of package yast2-kdump for openSUSE:Factory 
checked in at 2016-09-30 15:26:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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  2016-09-08 
17:37:57.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-kdump.new/yast2-kdump.changes     
2016-09-30 15:27:15.000000000 +0200
@@ -1,0 +2,7 @@
+Thu Sep 22 15:20:08 CEST 2016 - [email protected]
+
+- AutoYaST: Taking proposed values if <crash_kernel> has not been
+  defined in AutoYaST configuration file. (bnc#997448)
+- 3.1.42
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-kdump.spec ++++++
--- /var/tmp/diff_new_pack.Ivn6HA/_old  2016-09-30 15:27:16.000000000 +0200
+++ /var/tmp/diff_new_pack.Ivn6HA/_new  2016-09-30 15:27:16.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-kdump
-Version:        3.1.41
+Version:        3.1.42
 Release:        0
 Summary:        Configuration of kdump
 License:        GPL-2.0

++++++ yast2-kdump-3.1.41.tar.bz2 -> yast2-kdump-3.1.42.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.41/package/yast2-kdump.changes 
new/yast2-kdump-3.1.42/package/yast2-kdump.changes
--- old/yast2-kdump-3.1.41/package/yast2-kdump.changes  2016-09-02 
10:59:04.000000000 +0200
+++ new/yast2-kdump-3.1.42/package/yast2-kdump.changes  2016-09-27 
09:25:23.000000000 +0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Thu Sep 22 15:20:08 CEST 2016 - [email protected]
+
+- AutoYaST: Taking proposed values if <crash_kernel> has not been
+  defined in AutoYaST configuration file. (bnc#997448)
+- 3.1.42
+
+-------------------------------------------------------------------
 Thu Sep  1 16:17:37 CEST 2016 - [email protected]
 
 - AutoYaST: Write <general> and <crash_kernel> sections correctly.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.41/package/yast2-kdump.spec 
new/yast2-kdump-3.1.42/package/yast2-kdump.spec
--- old/yast2-kdump-3.1.41/package/yast2-kdump.spec     2016-09-02 
10:59:04.000000000 +0200
+++ new/yast2-kdump-3.1.42/package/yast2-kdump.spec     2016-09-27 
09:25:23.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-kdump
-Version:        3.1.41
+Version:        3.1.42
 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.41/src/modules/Kdump.rb 
new/yast2-kdump-3.1.42/src/modules/Kdump.rb
--- old/yast2-kdump-3.1.41/src/modules/Kdump.rb 2016-09-02 10:59:04.000000000 
+0200
+++ new/yast2-kdump-3.1.42/src/modules/Kdump.rb 2016-09-27 09:25:23.000000000 
+0200
@@ -943,8 +943,18 @@
         @KDUMP_SETTINGS[key] = value.nil? ? def_value : value
       end
 
-      # Make sure it's an array
-      @crashkernel_param_values = Array(settings.fetch("crash_kernel", ""))
+      if Builtins.haskey(settings, "crash_kernel")
+        # Make sure it's an array
+        @crashkernel_param_values = Array(settings.fetch("crash_kernel", ""))
+        # In order not to overwrite the values by the proposal we will have to 
set
+        # according allocated memory too. (bnc#995750)
+        @allocated_memory = get_allocated_memory(@crashkernel_param_values)
+      else
+        # Taking proposed values (bnc#997448)
+        ProposeAllocatedMemory()
+        # Make sure it's an array
+        @crashkernel_param_values = Array(crash_kernel_values)
+      end
       if settings.has_key?("add_crash_kernel")
         @add_crashkernel_param = settings["add_crash_kernel"]
       else
@@ -1088,10 +1098,9 @@
     def crash_kernel_values
       # If the current values include "nasty" things and the user has not
       # overriden the value of @crashkernel_list_ranges to autorize the
-      # modification. OR the value has been imported by AutoYAST (bnc#995750).
-      # In both cases the old value (ensuring the Array format) will be
-      # returned.
-      if @crashkernel_list_ranges || @import_called
+      # modification.
+      # The old value (ensuring the Array format) will be returned.
+      if @crashkernel_list_ranges
         return Array(@crashkernel_param_values.dup)
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.41/test/kdump_test.rb 
new/yast2-kdump-3.1.42/test/kdump_test.rb
--- old/yast2-kdump-3.1.41/test/kdump_test.rb   2016-09-02 10:59:04.000000000 
+0200
+++ new/yast2-kdump-3.1.42/test/kdump_test.rb   2016-09-27 09:25:24.000000000 
+0200
@@ -420,8 +420,12 @@
     end
 
     context "during autoinstallation" do
+      let(:bootlader_kernel_params) { ["73M,high"] }
+
       before do
         allow(Yast::Mode).to receive(:autoinst).and_return true
+        allow(Yast::Kdump.calibrator).to receive(:default_low).and_return 0
+        allow(Yast::Kdump.calibrator).to receive(:default_high).and_return 73
         Yast::Kdump.Import(profile)
       end
 
@@ -439,13 +443,27 @@
         end
       end
 
-      context "if kdump is requested but no value for crashkernel is supplied" 
do
-        let(:profile) { { "add_crash_kernel" => true } }
+      context "if kdump is requested but empty value for crashkernel is 
supplied" do
+        let(:profile) { { "add_crash_kernel" => true, "crash_kernel" => [] } }
 
         it "writes an empty crashkernel in the bootloader and enables the 
service" do
           expect(Yast::Bootloader)
             .to receive(:modify_kernel_params)
-            .with(:common, :xen_guest, :recovery, "crashkernel" => [""])
+            .with(:common, :xen_guest, :recovery, "crashkernel" => [])
+          expect(Yast::Bootloader).to receive(:Write)
+          expect(Yast::Service).to receive(:Enable).with("kdump")
+
+          Yast::Kdump.WriteKdumpBootParameter
+        end
+      end
+
+      context "if kdump is requested but no value for crashkernel is supplied" 
do
+        let(:profile) {{ "add_crash_kernel" => true }}
+
+        it "writes a proposed crashkernel in the bootloader and enables the 
service" do
+          expect(Yast::Bootloader)
+            .to receive(:modify_kernel_params)
+            .with(:common, :xen_guest, :recovery, "crashkernel" => 
bootlader_kernel_params)
           expect(Yast::Bootloader).to receive(:Write)
           expect(Yast::Service).to receive(:Enable).with("kdump")
 
@@ -483,8 +501,12 @@
     end
 
     context "during autoupgrade" do
+      let(:bootlader_kernel_params) { ["75M,high"] }
+
       before do
         allow(Yast::Mode).to receive(:autoupgrade).and_return true
+        allow(Yast::Kdump.calibrator).to receive(:default_low).and_return 0
+        allow(Yast::Kdump.calibrator).to receive(:default_high).and_return 75
         Yast::Kdump.Import(profile)
       end
 
@@ -502,13 +524,27 @@
         end
       end
 
-      context "if kdump is requested but no value for crashkernel is supplied" 
do
-        let(:profile) { { "add_crash_kernel" => true } }
+      context "if kdump is requested but an empty value for crashkernel is 
supplied" do
+        let(:profile) { { "add_crash_kernel" => true, "crash_kernel" => [] } }
 
         it "writes an empty crashkernel in the bootloader and enables the 
service" do
           expect(Yast::Bootloader)
             .to receive(:modify_kernel_params)
-            .with(:common, :xen_guest, :recovery, "crashkernel" => [""])
+            .with(:common, :xen_guest, :recovery, "crashkernel" => [])
+          expect(Yast::Bootloader).to receive(:Write)
+          expect(Yast::Service).to receive(:Enable).with("kdump")
+
+          Yast::Kdump.WriteKdumpBootParameter
+        end
+      end
+
+      context "if kdump is requested but no value for crashkernel is supplied" 
do
+        let(:profile) {{ "add_crash_kernel" => true }}
+
+        it "rewrites the bootloader crashkernel settings and enables the 
service" do
+          expect(Yast::Bootloader)
+            .to receive(:modify_kernel_params)
+            .with(:common, :xen_guest, :recovery, "crashkernel" => 
bootlader_kernel_params)
           expect(Yast::Bootloader).to receive(:Write)
           expect(Yast::Service).to receive(:Enable).with("kdump")
 


Reply via email to