Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package yast2-country for openSUSE:Factory checked in at 2021-03-30 20:50:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-country (Old) and /work/SRC/openSUSE:Factory/.yast2-country.new.2401 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-country" Tue Mar 30 20:50:01 2021 rev:220 rq:878134 version:4.3.13 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-country/yast2-country.changes 2021-02-26 21:58:05.239748938 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-country.new.2401/yast2-country.changes 2021-03-30 20:50:03.564026204 +0200 @@ -1,0 +2,6 @@ +Tue Mar 9 16:42:21 UTC 2021 - Josef Reidinger <jreidin...@suse.com> + +- Adapt keyboard layout dialog to work in firstboot (bsc#1183162) +- 4.3.13 + +------------------------------------------------------------------- Old: ---- yast2-country-4.3.12.tar.bz2 New: ---- yast2-country-4.3.13.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-country.spec ++++++ --- /var/tmp/diff_new_pack.bpRXEB/_old 2021-03-30 20:50:04.980027791 +0200 +++ /var/tmp/diff_new_pack.bpRXEB/_new 2021-03-30 20:50:04.984027796 +0200 @@ -17,7 +17,7 @@ Name: yast2-country -Version: 4.3.12 +Version: 4.3.13 Release: 0 Summary: YaST2 - Country Settings (Language, Keyboard, and Timezone) License: GPL-2.0-only ++++++ yast2-country-4.3.12.tar.bz2 -> yast2-country-4.3.13.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.3.12/keyboard/src/lib/y2keyboard/dialogs/layout_selector.rb new/yast2-country-4.3.13/keyboard/src/lib/y2keyboard/dialogs/layout_selector.rb --- old/yast2-country-4.3.12/keyboard/src/lib/y2keyboard/dialogs/layout_selector.rb 2021-02-12 15:06:33.000000000 +0100 +++ new/yast2-country-4.3.13/keyboard/src/lib/y2keyboard/dialogs/layout_selector.rb 2021-03-10 10:41:02.000000000 +0100 @@ -22,10 +22,12 @@ require_relative "../keyboard_layout_loader" require_relative "../keyboard_layout" -Yast.import "UI" -Yast.import "Popup" +Yast.import "GetInstArgs" Yast.import "Mode" +Yast.import "Popup" Yast.import "Stage" +Yast.import "UI" +Yast.import "Wizard" module Y2Keyboard module Dialogs @@ -37,6 +39,26 @@ @previous_selected_layout = KeyboardLayout.current_layout end + # First boot using Wizard, so we need here in firstboot set + # wizard content instead of opening dialog. bsc#1183162 + def create_dialog + return super unless Yast::Stage.firstboot + + args = Yast::GetInstArgs.argmap + Yast::Wizard.SetContents(heading, dialog_content, help_text, + args.fetch("enable_back", true), args.fetch("enable_next", true)) + + # SetContents always return nil, so return always true here + true + end + + # First boot using Wizard, so do not close anything. bsc#1183162 + def close_dialog + return super unless Yast::Stage.firstboot + + true + end + def dialog_options Opt(:decorated, :defaultsize) end @@ -48,13 +70,17 @@ HWeight(50, layout_selection_box), HWeight(20, HStretch()) ), - Yast::Stage.firstboot ? footer_firstboot : footer + Yast::Stage.firstboot ? Empty() : footer ) end + def heading + _("System Keyboard Configuration") + end + def layout_selection_box VBox( - Left(Heading(_("System Keyboard Configuration"))), + Yast::Stage.firstboot ? Empty() : Left(Heading(heading)), SelectionBox( Id(:layout_list), Opt(:notify), @@ -140,17 +166,6 @@ HSpacing() ) end - - def footer_firstboot - HBox( - HSpacing(), - Left(PushButton(Id(:help), Opt(:key_F1, :help), Yast::Label.HelpButton)), - PushButton(Id(:abort), Yast::Label.AbortButton), - PushButton(Id(:back), Yast::Label.BackButton), - PushButton(Id(:next), Yast::Label.NextButton), - HSpacing() - ) - end end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.3.12/keyboard/test/layout_selector_spec.rb new/yast2-country-4.3.13/keyboard/test/layout_selector_spec.rb --- old/yast2-country-4.3.12/keyboard/test/layout_selector_spec.rb 2021-02-12 15:06:33.000000000 +0100 +++ new/yast2-country-4.3.13/keyboard/test/layout_selector_spec.rb 2021-03-10 10:41:02.000000000 +0100 @@ -41,6 +41,44 @@ mock_ui_events(:cancel) end + context "in firstboot" do + before do + allow(Yast::Stage).to receive(:firstboot).and_return(true) + end + + it "sets wizard content" do + expect(Yast::Wizard).to receive(:SetContents) + expect(Yast::UI).to_not receive(:OpenDialog) + + layout_selector.run + end + + it "does not close dialog" do + expect(Yast::UI).to_not receive(:CloseDialog) + + layout_selector.run + end + end + + context "in normal mode" do + before do + allow(Yast::Stage).to receive(:firstboot).and_return(false) + end + + it "opens dialog" do + expect(Yast::UI).to receive(:OpenDialog).and_return(true) + + layout_selector.run + end + + it "closes dialog" do + expect(Yast::UI).to receive(:CloseDialog).and_return(true) + + layout_selector.run + end + end + + it "retrieve keyboard layouts" do expect(keyboard_layout).to receive(:all) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.3.12/package/yast2-country.changes new/yast2-country-4.3.13/package/yast2-country.changes --- old/yast2-country-4.3.12/package/yast2-country.changes 2021-02-12 15:06:33.000000000 +0100 +++ new/yast2-country-4.3.13/package/yast2-country.changes 2021-03-10 10:41:02.000000000 +0100 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Mar 9 16:42:21 UTC 2021 - Josef Reidinger <jreidin...@suse.com> + +- Adapt keyboard layout dialog to work in firstboot (bsc#1183162) +- 4.3.13 + +------------------------------------------------------------------- Fri Feb 12 13:54:28 UTC 2021 - Ancor Gonzalez Sosa <an...@suse.com> - Adapted unit test to recent changes in Yast::Report (related to diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.3.12/package/yast2-country.spec new/yast2-country-4.3.13/package/yast2-country.spec --- old/yast2-country-4.3.12/package/yast2-country.spec 2021-02-12 15:06:33.000000000 +0100 +++ new/yast2-country-4.3.13/package/yast2-country.spec 2021-03-10 10:41:02.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-country -Version: 4.3.12 +Version: 4.3.13 Release: 0 Summary: YaST2 - Country Settings (Language, Keyboard, and Timezone) License: GPL-2.0-only