Hello community, here is the log from the commit of package yast2 for openSUSE:Factory checked in at 2020-06-27 23:21:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2 (Old) and /work/SRC/openSUSE:Factory/.yast2.new.3060 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2" Sat Jun 27 23:21:54 2020 rev:485 rq:816572 version:4.3.9 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2/yast2.changes 2020-06-19 16:48:57.958247516 +0200 +++ /work/SRC/openSUSE:Factory/.yast2.new.3060/yast2.changes 2020-06-27 23:21:58.157701754 +0200 @@ -1,0 +2,7 @@ +Sun Jun 21 20:01:42 UTC 2020 - Knut Anderssen <kander...@suse.com> + +- Add a method to change the selection of the network backend to be + used (related to bsc#1172749) +- 4.3.9 + +------------------------------------------------------------------- Old: ---- yast2-4.3.8.tar.bz2 New: ---- yast2-4.3.9.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2.spec ++++++ --- /var/tmp/diff_new_pack.Lf9alf/_old 2020-06-27 23:21:59.157705042 +0200 +++ /var/tmp/diff_new_pack.Lf9alf/_new 2020-06-27 23:21:59.157705042 +0200 @@ -1,7 +1,7 @@ # # spec file for package yast2 # -# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,17 +12,17 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: yast2 -Version: 4.3.8 +Version: 4.3.9 Release: 0 Summary: YaST2 Main Package License: GPL-2.0-only Group: System/YaST -Url: https://github.com/yast/yast-yast2 +URL: https://github.com/yast/yast-yast2 Source0: %{name}-%{version}.tar.bz2 Source1: yast2-rpmlintrc ++++++ yast2-4.3.8.tar.bz2 -> yast2-4.3.9.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.3.8/library/network/src/modules/NetworkService.rb new/yast2-4.3.9/library/network/src/modules/NetworkService.rb --- old/yast2-4.3.8/library/network/src/modules/NetworkService.rb 2020-06-18 18:21:31.000000000 +0200 +++ new/yast2-4.3.9/library/network/src/modules/NetworkService.rb 2020-06-22 09:07:29.000000000 +0200 @@ -157,6 +157,19 @@ alias_method :is_disabled, :disabled? + # Choose the given backend as the one to be used + # + # @param name [Symbol] backend name + # @param [Boolean] return whether the given backend was selected or not + def use(name) + return false unless BACKENDS.key?(name) + + Read() + @cached_name = name + + true + end + def use_network_manager Read() @cached_name = :network_manager diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.3.8/library/network/test/network_service_test.rb new/yast2-4.3.9/library/network/test/network_service_test.rb --- old/yast2-4.3.8/library/network/test/network_service_test.rb 2020-06-18 18:21:31.000000000 +0200 +++ new/yast2-4.3.9/library/network/test/network_service_test.rb 2020-06-22 09:07:29.000000000 +0200 @@ -150,4 +150,44 @@ expect(subject.wicked?).to eq(true) end end + + describe "#use" do + before do + allow(subject).to receive(:backend_in_use).and_return(:wicked) + subject.reset! + end + + context "when the given backend is supported" do + it "ensures that the config is read before modifying it" do + expect(subject).to receive(:Read).and_call_original + subject.use(:network_manager) + end + + it "changes the backend to the one given" do + expect { subject.use(:network_manager) } + .to change { subject.cached_name }.from(:wicked).to(:network_manager) + end + + it "returns true" do + expect(subject.use(:wicked)).to eql(true) + end + end + + context "when the given backend is not supported" do + it "does not try to read the current config" do + expect(subject).to_not receive(:Read) + subject.use(:not_supported) + end + + it "does not modify the cached name" do + value = subject.cached_name + subject.use(:not_supported) + expect(subject.cached_name).to eql(value) + end + + it "returns false" do + expect(subject.use(:not_supported)).to eql(false) + end + end + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.3.8/package/yast2.changes new/yast2-4.3.9/package/yast2.changes --- old/yast2-4.3.8/package/yast2.changes 2020-06-18 18:21:31.000000000 +0200 +++ new/yast2-4.3.9/package/yast2.changes 2020-06-22 09:07:29.000000000 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Sun Jun 21 20:01:42 UTC 2020 - Knut Anderssen <kander...@suse.com> + +- Add a method to change the selection of the network backend to be + used (related to bsc#1172749) +- 4.3.9 + +------------------------------------------------------------------- Thu Jun 18 15:23:54 UTC 2020 - Ladislav Slezák <lsle...@suse.cz> - Updated Yast::XML.validate arguments diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.3.8/package/yast2.spec new/yast2-4.3.9/package/yast2.spec --- old/yast2-4.3.8/package/yast2.spec 2020-06-18 18:21:31.000000000 +0200 +++ new/yast2-4.3.9/package/yast2.spec 2020-06-22 09:07:29.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2 -Version: 4.3.8 +Version: 4.3.9 Release: 0 Summary: YaST2 Main Package License: GPL-2.0-only