Hello community, here is the log from the commit of package yast2 for openSUSE:Leap:15.2 checked in at 2020-03-26 05:41:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/yast2 (Old) and /work/SRC/openSUSE:Leap:15.2/.yast2.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2" Thu Mar 26 05:41:01 2020 rev:177 rq:787745 version:4.2.76 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/yast2/yast2.changes 2020-03-19 08:35:50.773831033 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.yast2.new.3160/yast2.changes 2020-03-26 05:41:03.587268858 +0100 @@ -1,0 +2,21 @@ +Mon Mar 23 11:15:56 UTC 2020 - Josef Reidinger <jreidin...@suse.com> + +- Add Popup#SuppressFeedback to allow to hide feedback for certain + actions (needed for bsc#1165705) +- 4.2.76 + +------------------------------------------------------------------- +Sat Mar 21 11:56:41 UTC 2020 - Knut Anderssen <kanders...@suse.com> + +- Force a reset of the firewalld API instance before reading the + firewalld configuration (bsc#1166698) +- 4.2.75 + +------------------------------------------------------------------- +Tue Mar 17 15:46:35 UTC 2020 - Ladislav Slezák <lsle...@suse.cz> + +- Fixed CWM::MultiStatusSelector help text icons displayed during + installation (related to bsc#1157780, bsc#1161308, bsc#1161200) +- 4.2.74 + +------------------------------------------------------------------- Old: ---- yast2-4.2.73.tar.bz2 New: ---- yast2-4.2.76.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2.spec ++++++ --- /var/tmp/diff_new_pack.fux8sp/_old 2020-03-26 05:41:03.979269061 +0100 +++ /var/tmp/diff_new_pack.fux8sp/_new 2020-03-26 05:41:03.983269063 +0100 @@ -17,7 +17,7 @@ Name: yast2 -Version: 4.2.73 +Version: 4.2.76 Release: 0 Summary: YaST2 Main Package License: GPL-2.0-only ++++++ yast2-4.2.73.tar.bz2 -> yast2-4.2.76.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.2.73/library/cwm/src/lib/cwm/multi_status_selector.rb new/yast2-4.2.76/library/cwm/src/lib/cwm/multi_status_selector.rb --- old/yast2-4.2.73/library/cwm/src/lib/cwm/multi_status_selector.rb 2020-03-13 11:47:39.000000000 +0100 +++ new/yast2-4.2.76/library/cwm/src/lib/cwm/multi_status_selector.rb 2020-03-23 14:55:14.000000000 +0100 @@ -299,12 +299,12 @@ def self.help help_text = "<p>" # TRANSLATORS: help text for a not selected check box - help_text << "#{icon_for(UNSELECTED)} = #{_("Not selected")}<br />" + help_text << "#{icon_for(UNSELECTED, mode: mode)} = #{_("Not selected")}<br />" # TRANSLATORS: help text for a selected check box - help_text << "#{icon_for(SELECTED)} = #{_("Selected")}<br />" + help_text << "#{icon_for(SELECTED, mode: mode)} = #{_("Selected")}<br />" # TRANSLATORS: help text for an automatically selected check box # (it has a different look that a user selected check box) - help_text << "#{icon_for(AUTO_SELECTED)} = #{_("Auto selected")}" + help_text << "#{icon_for(AUTO_SELECTED, mode: mode)} = #{_("Auto selected")}" help_text << "</p>" help_text end @@ -405,11 +405,28 @@ "#{checkbox_input} #{checkbox_label}" end + # Determines whether running in installation mode + # + # We do not use Stage.initial because of firstboot, which runs in 'installation' mode + # but in 'firstboot' stage. + # + # @return [Boolean] Boolean if running in installation or update mode + def self.installation? + Yast::Mode.installation || Yast::Mode.update + end + + # Returns the current mode + # + # @return [String] "normal" in a running system; "inst" during the installation + def self.mode + installation? ? "inst" : "normal" + end + private # @see .icon_for def icon - self.class.icon_for(status, mode: mode, state: state) + self.class.icon_for(status, mode: self.class.mode, state: state) end # Builds the check box input representation @@ -434,13 +451,6 @@ end end - # Returns the current mode - # - # @return [String] "normal" in a running system; "inst" during the installation - def mode - installation? ? "inst" : "normal" - end - # Returns the current input state # # @return [String] "enabled" when item must be enabled; "disabled" otherwise @@ -462,20 +472,10 @@ # "black" otherwise def color return "grey" unless enabled? - return "white" if installation? + return "white" if self.class.installation? "black" end - - # Determines whether running in installation mode - # - # We do not use Stage.initial because of firstboot, which runs in 'installation' mode - # but in 'firstboot' stage. - # - # @return [Boolean] Boolean if running in installation or update mode - def installation? - Yast::Mode.installation || Yast::Mode.update - end end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.2.73/library/cwm/test/multi_status_selector_test.rb new/yast2-4.2.76/library/cwm/test/multi_status_selector_test.rb --- old/yast2-4.2.73/library/cwm/test/multi_status_selector_test.rb 2020-03-13 11:47:39.000000000 +0100 +++ new/yast2-4.2.76/library/cwm/test/multi_status_selector_test.rb 2020-03-23 14:55:14.000000000 +0100 @@ -436,4 +436,28 @@ end end end + + describe ".help" do + context "in installation" do + before do + allow(Yast::Mode).to receive(:installation).and_return(true) + allow(Yast::Mode).to receive(:update).and_return(false) + end + + it "uses the installation icon" do + expect(subject.class.help).to include("inst_checkbox-on.svg") + end + end + + context "in installed system" do + before do + allow(Yast::Mode).to receive(:installation).and_return(false) + allow(Yast::Mode).to receive(:update).and_return(false) + end + + it "uses the standard icon" do + expect(subject.class.help).to include("checkbox-on.svg") + end + end + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.2.73/library/general/src/modules/Popup.rb new/yast2-4.2.76/library/general/src/modules/Popup.rb --- old/yast2-4.2.73/library/general/src/modules/Popup.rb 2020-03-13 11:47:39.000000000 +0100 +++ new/yast2-4.2.76/library/general/src/modules/Popup.rb 2020-03-23 14:55:14.000000000 +0100 @@ -1009,6 +1009,8 @@ ) @feedback_open = true + @feedback_headline = headline + @feedback_message = message nil end @@ -1017,6 +1019,8 @@ # The popup is automatically closed at the end # (even when an exception is raised) # @see {ShowFeedback} and {ClearFeedback} for details + # To suppress temporary feedback see {SuppressFeedback} + # # @param headline [String] popup headline (displayed in bold) # @param message [String] message with details, displayed below the headline # @param block block to execute @@ -1029,6 +1033,21 @@ ClearFeedback() end + # Hides feedback during block execution. + # After block it is shown again. When exception is raised, then it is + # NOT shown again. + # @see {Feedback}, {ShowFeedback} and {ClearFeedback} for details + # @param block block to execute + def SuppressFeedback(&block) + raise ArgumentError, "block must be supplied" unless block + + return block.call unless @feedback_open # just call block if feedback is not open + + ClearFeedback() + block.call + ShowFeedback(@feedback_headline, @feedback_message) + end + # Show a simple message and wait until user clicked "OK". # # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.2.73/library/general/test/popup_test.rb new/yast2-4.2.76/library/general/test/popup_test.rb --- old/yast2-4.2.73/library/general/test/popup_test.rb 2020-03-13 11:47:39.000000000 +0100 +++ new/yast2-4.2.76/library/general/test/popup_test.rb 2020-03-23 14:55:14.000000000 +0100 @@ -18,18 +18,20 @@ describe ".Feedback" do context "when arguments are good" do before do - expect(ui).to receive(:OpenDialog) - expect(ui).to receive(:CloseDialog) allow(ui).to receive(:BusyCursor) allow(ui).to receive(:GetDisplayInfo).and_return({}) end it "opens a popup dialog and closes it at the end" do + expect(ui).to receive(:OpenDialog).ordered + expect(ui).to receive(:CloseDialog).ordered # just pass an empty block subject.Feedback("Label", "Message") {} end it "closes the popup even when an exception occurs in the block" do + expect(ui).to receive(:OpenDialog).ordered + expect(ui).to receive(:CloseDialog).ordered # raise an exception in the block expect { subject.Feedback("Label", "Message") { raise "TEST" } }.to raise_error(RuntimeError, "TEST") end @@ -42,6 +44,37 @@ end end end + + describe ".SuppressFeedback" do + before do + allow(ui).to receive(:BusyCursor) + allow(ui).to receive(:GetDisplayInfo).and_return({}) + end + + it "closes a popup dialog and opens it at the end when feedback is shown" do + # check the correct Open/Close sequence + expect(ui).to receive(:OpenDialog).ordered + expect(ui).to receive(:CloseDialog).ordered + expect(ui).to receive(:OpenDialog).ordered + expect(ui).to receive(:CloseDialog).ordered + subject.Feedback("test", "test") do + subject.SuppressFeedback {} + end + end + + it "just call block if no feedback is given" do + expect(ui).to_not receive(:OpenDialog) + expect(ui).to_not receive(:CloseDialog) + subject.SuppressFeedback {} + end + + context "when block is missing" do + it "raises exception" do + # no block passed + expect { subject.SuppressFeedback }.to raise_error(ArgumentError, /block must be supplied/) + end + end + end describe ".Message" do before { allow(ui).to receive(:OpenDialog) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.2.73/library/network/src/lib/y2firewall/firewalld.rb new/yast2-4.2.76/library/network/src/lib/y2firewall/firewalld.rb --- old/yast2-4.2.73/library/network/src/lib/y2firewall/firewalld.rb 2020-03-13 11:47:39.000000000 +0100 +++ new/yast2-4.2.76/library/network/src/lib/y2firewall/firewalld.rb 2020-03-23 14:55:14.000000000 +0100 @@ -91,6 +91,9 @@ def read(minimal: false) return false unless installed? + # Force a reset of the API instance when reading the first time (bsc#1166698) + @api = nil + @current_zone_names = api.zones @current_service_names = api.services if minimal @@ -266,6 +269,7 @@ def reset load_defaults untouched! + @api = nil @read = false end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.2.73/library/network/test/y2firewall/firewalld_test.rb new/yast2-4.2.76/library/network/test/y2firewall/firewalld_test.rb --- old/yast2-4.2.73/library/network/test/y2firewall/firewalld_test.rb 2020-03-13 11:47:39.000000000 +0100 +++ new/yast2-4.2.76/library/network/test/y2firewall/firewalld_test.rb 2020-03-23 14:55:14.000000000 +0100 @@ -244,7 +244,7 @@ end before do - allow(firewalld).to receive("api").and_return api + allow(Y2Firewall::Firewalld::Api).to receive(:new).and_return(api) end it "returns false if firewalld is not installed" do @@ -253,6 +253,13 @@ expect(firewalld.read).to eq(false) end + it "resets the firewalld api instance" do + expect(Y2Firewall::Firewalld::Api).to receive(:new).twice.and_return(:first, api) + api = firewalld.api + firewalld.read + expect(firewalld.api).to_not eq(api) + end + it "stores the list of available zone names" do expect { firewalld.read }.to change { firewalld.current_zone_names }.from([]).to(known_zones) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.2.73/package/yast2.changes new/yast2-4.2.76/package/yast2.changes --- old/yast2-4.2.73/package/yast2.changes 2020-03-13 11:47:39.000000000 +0100 +++ new/yast2-4.2.76/package/yast2.changes 2020-03-23 14:55:14.000000000 +0100 @@ -1,4 +1,25 @@ ------------------------------------------------------------------- +Mon Mar 23 11:15:56 UTC 2020 - Josef Reidinger <jreidin...@suse.com> + +- Add Popup#SuppressFeedback to allow to hide feedback for certain + actions (needed for bsc#1165705) +- 4.2.76 + +------------------------------------------------------------------- +Sat Mar 21 11:56:41 UTC 2020 - Knut Anderssen <kanders...@suse.com> + +- Force a reset of the firewalld API instance before reading the + firewalld configuration (bsc#1166698) +- 4.2.75 + +------------------------------------------------------------------- +Tue Mar 17 15:46:35 UTC 2020 - Ladislav Slezák <lsle...@suse.cz> + +- Fixed CWM::MultiStatusSelector help text icons displayed during + installation (related to bsc#1157780, bsc#1161308, bsc#1161200) +- 4.2.74 + +------------------------------------------------------------------- Fri Mar 13 01:54:58 UTC 2020 - David Diaz <dgonza...@suse.com> - CWM::MultiStatusSelector minor improvements (related to diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.2.73/package/yast2.spec new/yast2-4.2.76/package/yast2.spec --- old/yast2-4.2.73/package/yast2.spec 2020-03-13 11:47:39.000000000 +0100 +++ new/yast2-4.2.76/package/yast2.spec 2020-03-23 14:55:14.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2 -Version: 4.2.73 +Version: 4.2.76 Release: 0 Summary: YaST2 Main Package License: GPL-2.0-only