Hello community, here is the log from the commit of package yast2-kdump for openSUSE:Factory checked in at 2019-11-20 10:25:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-kdump (Old) and /work/SRC/openSUSE:Factory/.yast2-kdump.new.26869 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-kdump" Wed Nov 20 10:25:09 2019 rev:97 rq:744102 version:4.2.6 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-kdump/yast2-kdump.changes 2019-10-03 14:05:46.156669855 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-kdump.new.26869/yast2-kdump.changes 2019-11-20 10:25:10.990537722 +0100 @@ -1,0 +2,7 @@ +Wed Oct 30 10:48:37 UTC 2019 - Josef Reidinger <[email protected]> + +- fix crash for empty kdump section (related to change for + bsc#1149208) +- 4.2.6 + +------------------------------------------------------------------- Old: ---- yast2-kdump-4.2.5.tar.bz2 New: ---- yast2-kdump-4.2.6.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-kdump.spec ++++++ --- /var/tmp/diff_new_pack.lhs93R/_old 2019-11-20 10:25:11.710537866 +0100 +++ /var/tmp/diff_new_pack.lhs93R/_new 2019-11-20 10:25:11.714537866 +0100 @@ -17,7 +17,7 @@ Name: yast2-kdump -Version: 4.2.5 +Version: 4.2.6 Release: 0 Summary: Configuration of kdump License: GPL-2.0-only ++++++ yast2-kdump-4.2.5.tar.bz2 -> yast2-kdump-4.2.6.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-4.2.5/package/yast2-kdump.changes new/yast2-kdump-4.2.6/package/yast2-kdump.changes --- old/yast2-kdump-4.2.5/package/yast2-kdump.changes 2019-09-26 16:12:29.000000000 +0200 +++ new/yast2-kdump-4.2.6/package/yast2-kdump.changes 2019-10-30 12:36:22.000000000 +0100 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Wed Oct 30 10:48:37 UTC 2019 - Josef Reidinger <[email protected]> + +- fix crash for empty kdump section (related to change for + bsc#1149208) +- 4.2.6 + +------------------------------------------------------------------- Thu Sep 26 12:25:08 UTC 2019 - Josef Reidinger <[email protected]> - fix installing kdump to first stage when kdump enabled in diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-4.2.5/package/yast2-kdump.spec new/yast2-kdump-4.2.6/package/yast2-kdump.spec --- old/yast2-kdump-4.2.5/package/yast2-kdump.spec 2019-09-26 16:12:29.000000000 +0200 +++ new/yast2-kdump-4.2.6/package/yast2-kdump.spec 2019-10-30 12:36:22.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-kdump -Version: 4.2.5 +Version: 4.2.6 Release: 0 Summary: Configuration of kdump License: GPL-2.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-4.2.5/src/modules/Kdump.rb new/yast2-kdump-4.2.6/src/modules/Kdump.rb --- old/yast2-kdump-4.2.5/src/modules/Kdump.rb 2019-09-26 16:12:29.000000000 +0200 +++ new/yast2-kdump-4.2.6/src/modules/Kdump.rb 2019-10-30 12:36:22.000000000 +0100 @@ -946,11 +946,11 @@ end # Import settings from a map - # @param [Hash] settings map of kdump settings + # @param [Hash, nil] settings map of kdump settings # @return [Boolean] true on success def Import(settings) - settings = deep_copy(settings) - Builtins.y2milestone("Importing settings for kdump") + settings ||= {} + Builtins.y2milestone("Importing settings for kdump #{settings.inspect}") my_import_map = Ops.get_map(settings, "general", {}) @DEFAULT_CONFIG.each_pair do |key, def_value| @@ -958,7 +958,7 @@ @KDUMP_SETTINGS[key] = value.nil? ? def_value : value end - if Builtins.haskey(settings, "crash_kernel") + if settings.key?("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 @@ -971,7 +971,7 @@ @crashkernel_param_values = Array(crash_kernel_values) end - if Builtins.haskey(settings, "crash_xen_kernel") + if settings.key?("crash_xen_kernel") # Make sure it's an array @crashkernel_xen_param_values = Array(settings.fetch("crash_xen_kernel", "")) else @@ -984,9 +984,8 @@ ProposeCrashkernelParam() end - if Builtins.haskey(settings, "crash_kernel") || - Builtins.haskey(settings, "add_crash_kernel") || - Ops.greater_than(Builtins.size(my_import_map), 0) + if settings.key?("crash_kernel") || settings.key?("add_crash_kernel") || + !my_import_map.empty? @import_called = true end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-4.2.5/test/kdump_test.rb new/yast2-kdump-4.2.6/test/kdump_test.rb --- old/yast2-kdump-4.2.5/test/kdump_test.rb 2019-09-26 16:12:29.000000000 +0200 +++ new/yast2-kdump-4.2.6/test/kdump_test.rb 2019-10-30 12:36:22.000000000 +0100 @@ -842,4 +842,9 @@ end end + describe ".Import" do + it "does not crash for nil parameter" do + expect { Yast::Kdump.Import(nil) }.to_not raise_error + end + end end
