Hello community, here is the log from the commit of package yast2-kdump for openSUSE:Factory checked in at 2016-09-08 17:37:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-08-18 10:19:27.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-kdump.new/yast2-kdump.changes 2016-09-08 17:37:57.000000000 +0200 @@ -1,0 +2,8 @@ +Thu Sep 1 16:17:37 CEST 2016 - [email protected] + +- AutoYaST: Write <general> and <crash_kernel> sections correctly. + Imported settings will not be overwritten by proposal. + (bnc#995750) +- 3.1.41 + +------------------------------------------------------------------- Old: ---- yast2-kdump-3.1.40.tar.bz2 New: ---- yast2-kdump-3.1.41.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-kdump.spec ++++++ --- /var/tmp/diff_new_pack.T3GQi0/_old 2016-09-08 17:37:58.000000000 +0200 +++ /var/tmp/diff_new_pack.T3GQi0/_new 2016-09-08 17:37:58.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-kdump -Version: 3.1.40 +Version: 3.1.41 Release: 0 Summary: Configuration of kdump License: GPL-2.0 ++++++ yast2-kdump-3.1.40.tar.bz2 -> yast2-kdump-3.1.41.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-3.1.40/CONTRIBUTING.md new/yast2-kdump-3.1.41/CONTRIBUTING.md --- old/yast2-kdump-3.1.40/CONTRIBUTING.md 2016-08-12 13:02:01.000000000 +0200 +++ new/yast2-kdump-3.1.41/CONTRIBUTING.md 2016-09-02 10:59:04.000000000 +0200 @@ -3,7 +3,7 @@ YaST is an open source project and as such it welcomes all kinds of contributions. If you decide to contribute, please follow these guidelines to -ensure the process is effective and pleasant both for you and YaST maintainers. +ensure the process is effective and pleasant both for you and the YaST maintainers. There are two main forms of contribution: reporting bugs and performing code changes. @@ -17,13 +17,11 @@ registration](https://secure-www.novell.com/selfreg/jsp/createSimpleAccount.jsp) if you don't have an account yet.) -If you find a problem, please report it either using -[Bugzilla](https://bugzilla.suse.com/) or GitHub issues. We can't guarantee -that every bug will be fixed, but we'll try. - When creating a bug report, please follow our [bug reporting guidelines](http://en.opensuse.org/openSUSE:Report_a_YaST_bug). +We can't guarantee that every bug will be fixed, but we'll try. + Code Changes ------------ @@ -44,15 +42,22 @@ to the [Ruby style guide](https://github.com/SUSE/style-guides/blob/master/Ruby.md). - 4. Make sure your change didn't break anything by building the RPM package + 4. Update the package version (in `packages/*.spec`, usually by + `rake version:bump`) and add a new entry to the `package/*.changes` file + (by `osc vc package`). + For bigger changes or changes which need longer discussion it is advised to + add this as a separate last commit so it can be easily updated when another + change is merged in the meantime. + + 5. Make sure your change didn't break anything by building the RPM package (`rake osc:build`). The build process includes running the full testsuite. - 5. Publish the branch and create a pull request. + 6. Publish the branch and create a pull request. - 6. YaST developers will review your change and possibly point out issues. + 7. YaST developers will review your change and possibly point out issues. Adapt the code under their guidance until they are all resolved. - 7. Finally, the pull request will get merged or rejected. + 8. Finally, the pull request will get merged or rejected. See also [GitHub's guide on contributing](https://help.github.com/articles/fork-a-repo). @@ -60,9 +65,6 @@ If you want to do multiple unrelated changes, use separate branches and pull requests. -Do not change the `VERSION` and `*.changes` files as this could lead to -conflicts. - ### Commits Each commit in the pull request should do only one thing, which is clearly diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-3.1.40/package/yast2-kdump.changes new/yast2-kdump-3.1.41/package/yast2-kdump.changes --- old/yast2-kdump-3.1.40/package/yast2-kdump.changes 2016-08-12 13:02:01.000000000 +0200 +++ new/yast2-kdump-3.1.41/package/yast2-kdump.changes 2016-09-02 10:59:04.000000000 +0200 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Thu Sep 1 16:17:37 CEST 2016 - [email protected] + +- AutoYaST: Write <general> and <crash_kernel> sections correctly. + Imported settings will not be overwritten by proposal. + (bnc#995750) +- 3.1.41 + +------------------------------------------------------------------- Fri Aug 12 10:45:05 CEST 2016 - [email protected] - Reading kernel_param: Filtering out empty entries. (bnc#991140) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-3.1.40/package/yast2-kdump.spec new/yast2-kdump-3.1.41/package/yast2-kdump.spec --- old/yast2-kdump-3.1.40/package/yast2-kdump.spec 2016-08-12 13:02:01.000000000 +0200 +++ new/yast2-kdump-3.1.41/package/yast2-kdump.spec 2016-09-02 10:59:04.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-kdump -Version: 3.1.40 +Version: 3.1.41 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.40/src/modules/Kdump.rb new/yast2-kdump-3.1.41/src/modules/Kdump.rb --- old/yast2-kdump-3.1.40/src/modules/Kdump.rb 2016-08-12 13:02:01.000000000 +0200 +++ new/yast2-kdump-3.1.41/src/modules/Kdump.rb 2016-09-02 10:59:04.000000000 +0200 @@ -684,14 +684,12 @@ # after that remember user settings def ProposeGlobalVars - if !@propose_called + # Settings have not been imported by AutoYaST and have not already + # been suggested by proposal. (bnc#930950, bnc#995750, bnc#890719). + if !@propose_called && !@import_called # added default settings @KDUMP_SETTINGS = deep_copy(@DEFAULT_CONFIG) - - # Autoyast: "add_crashkernel_param" will be set by using autoinst.xml - # (bnc#890719) - @add_crashkernel_param = ProposeCrashkernelParam() unless Mode.autoinst - + @add_crashkernel_param = ProposeCrashkernelParam() @crashkernel_param = false end @propose_called = true @@ -1090,8 +1088,12 @@ 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, return the old values (ensuring the Array format) - return Array(@crashkernel_param_values.dup) if @crashkernel_list_ranges + # 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 + return Array(@crashkernel_param_values.dup) + end result = [] high = @allocated_memory[:high] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-3.1.40/test/kdump_test.rb new/yast2-kdump-3.1.41/test/kdump_test.rb --- old/yast2-kdump-3.1.40/test/kdump_test.rb 2016-08-12 13:02:01.000000000 +0200 +++ new/yast2-kdump-3.1.41/test/kdump_test.rb 2016-09-02 10:59:04.000000000 +0200 @@ -415,15 +415,13 @@ describe ".WriteKdumpBootParameter" do before do - Yast::Mode.SetMode(mode) # FIXME: current tests do not cover fadump (ppc64 specific) allow(Yast::Kdump.system).to receive(:supports_fadump?).and_return false end context "during autoinstallation" do - let(:mode) { "autoinstallation" } - before do + allow(Yast::Mode).to receive(:autoinst).and_return true Yast::Kdump.Import(profile) end @@ -485,9 +483,8 @@ end context "during autoupgrade" do - let(:mode) { "autoupgrade" } - before do + allow(Yast::Mode).to receive(:autoupgrade).and_return true Yast::Kdump.Import(profile) end @@ -549,9 +546,8 @@ end context "in normal mode" do - let(:mode) { "normal" } - before do + allow(Yast::Mode).to receive(:normal).and_return true allow(Yast::Popup).to receive(:Message) allow(Yast::Bootloader).to receive(:kernel_param).and_return kernel_param Yast::Kdump.ReadKdumpKernelParam @@ -650,9 +646,8 @@ end context "during update" do - let(:mode) { "update" } - before do + allow(Yast::Mode).to receive(:update).and_return true allow(Yast::Popup).to receive(:Message) allow(Yast::Bootloader).to receive(:kernel_param).and_return kernel_param allow(Yast::Bootloader).to receive(:Write) @@ -686,12 +681,11 @@ end describe ".Update" do - before do - Yast::Mode.SetMode(mode) - end context "in update mode" do - let(:mode) { "update" } + before do + allow(Yast::Mode).to receive(:update).and_return true + end it "reads kernel param, update kdump boot parameter and returns true" do expect(Yast::Kdump).to receive(:ReadKdumpKernelParam) @@ -701,7 +695,9 @@ end context "in update mode" do - let(:mode) { "autoupgrade" } + before do + allow(Yast::Mode).to receive(:autoupgrade).and_return true + end it "does not reads kernel param but update kdump boot parameter and returns true" do expect(Yast::Kdump).to_not receive(:ReadKdumpKernelParam) @@ -729,4 +725,28 @@ expect(memory).to eq(high: "64", low: "32") end end + + describe ".Proposal" do + + context "during AutoYaST installation" do + before do + allow(Yast::Mode).to receive(:autoinstallation).and_return true + end + let(:profile) { {"add_crash_kernel"=>true, + "crash_kernel"=>"256M", + "general"=>{"KDUMP_SAVEDIR"=>"file:///var/dummy"} + } + } + # bnc#995750 + it "does not override imported AutoYaST settings" do + Yast::Kdump.Import(profile) + Yast::Kdump.Propose + ret = Yast::Kdump.Export + expect(ret["add_crash_kernel"]).to eq(profile["add_crash_kernel"]) + expect(ret["crash_kernel"]).to eq(profile["crash_kernel"]) + expect(ret["general"]["KDUMP_SAVEDIR"]).to eq(profile["general"]["KDUMP_SAVEDIR"]) + end + end + end + end
