Hello community, here is the log from the commit of package yast2-network for openSUSE:Factory checked in at 2020-10-23 12:20:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-network (Old) and /work/SRC/openSUSE:Factory/.yast2-network.new.3463 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-network" Fri Oct 23 12:20:15 2020 rev:435 rq:842818 version:4.3.27 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes 2020-10-18 16:20:28.760465669 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-network.new.3463/yast2-network.changes 2020-10-23 12:20:47.792617466 +0200 @@ -1,0 +2,6 @@ +Tue Oct 20 13:03:00 UTC 2020 - Josef Reidinger <jreidin...@suse.com> + +- fix crash when hostname file missing (bsc#1177904) +- 4.3.27 + +------------------------------------------------------------------- Old: ---- yast2-network-4.3.26.tar.bz2 New: ---- yast2-network-4.3.27.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-network.spec ++++++ --- /var/tmp/diff_new_pack.7mZKF9/_old 2020-10-23 12:20:49.736618836 +0200 +++ /var/tmp/diff_new_pack.7mZKF9/_new 2020-10-23 12:20:49.736618836 +0200 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 4.3.26 +Version: 4.3.27 Release: 0 Summary: YaST2 - Network Configuration License: GPL-2.0-only ++++++ yast2-network-4.3.26.tar.bz2 -> yast2-network-4.3.27.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.26/package/yast2-network.changes new/yast2-network-4.3.27/package/yast2-network.changes --- old/yast2-network-4.3.26/package/yast2-network.changes 2020-10-08 16:19:16.000000000 +0200 +++ new/yast2-network-4.3.27/package/yast2-network.changes 2020-10-20 15:18:08.000000000 +0200 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Oct 20 13:03:00 UTC 2020 - Josef Reidinger <jreidin...@suse.com> + +- fix crash when hostname file missing (bsc#1177904) +- 4.3.27 + +------------------------------------------------------------------- Wed Oct 7 11:45:04 UTC 2020 - Knut Anderssen <kanders...@suse.com> - Write hostname changes when modified through the 'dns' client diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.26/package/yast2-network.spec new/yast2-network-4.3.27/package/yast2-network.spec --- old/yast2-network-4.3.26/package/yast2-network.spec 2020-10-08 16:19:16.000000000 +0200 +++ new/yast2-network-4.3.27/package/yast2-network.spec 2020-10-20 15:18:08.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 4.3.26 +Version: 4.3.27 Release: 0 Summary: YaST2 - Network Configuration License: GPL-2.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.26/src/lib/y2network/widgets/boot_protocol.rb new/yast2-network-4.3.27/src/lib/y2network/widgets/boot_protocol.rb --- old/yast2-network-4.3.26/src/lib/y2network/widgets/boot_protocol.rb 2020-10-08 16:19:16.000000000 +0200 +++ new/yast2-network-4.3.27/src/lib/y2network/widgets/boot_protocol.rb 2020-10-20 15:18:08.000000000 +0200 @@ -174,7 +174,7 @@ one_ip = Yast::UI.QueryWidget(Id(:bootproto_ipaddr), :Value) if one_ip.empty? current_hostname = Yast::Hostname.MergeFQ(Yast::DNS.hostname, Yast::DNS.domain) - unless current_hostname.empty? || (current_hostname == "localhost") + if ![nil, "", "localhost"].include?(current_hostname) log.info "Presetting global hostname" Yast::UI.ChangeWidget(Id(:bootproto_hostname), :Value, current_hostname) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.26/test/y2network/widgets/boot_protocol_test.rb new/yast2-network-4.3.27/test/y2network/widgets/boot_protocol_test.rb --- old/yast2-network-4.3.26/test/y2network/widgets/boot_protocol_test.rb 2020-10-08 16:19:16.000000000 +0200 +++ new/yast2-network-4.3.27/test/y2network/widgets/boot_protocol_test.rb 2020-10-20 15:18:08.000000000 +0200 @@ -304,4 +304,22 @@ end end end + + describe "#handle" do + context "switched to static boot protocol" do + let(:value) { "static" } + + before do + allow(Yast::UI).to receive(:QueryWidget).with(Id(:bootproto_ipaddr), :Value) + .and_return("") + end + + it "does not propose hostname if current hostname is missing" do + allow(Yast::DNS).to receive(:hostname).and_return(nil) + + expect(Yast::UI).to_not receive(:ChangeWidget) + .with(Id(:bootproto_hostname), :Value, anything) + end + end + end end