Hello community, here is the log from the commit of package yast2-registration for openSUSE:Factory checked in at 2020-01-17 16:03:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-registration (Old) and /work/SRC/openSUSE:Factory/.yast2-registration.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-registration" Fri Jan 17 16:03:05 2020 rev:46 rq:764717 version:4.2.26 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-registration/yast2-registration.changes 2020-01-11 14:47:47.733368536 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-registration.new.26092/yast2-registration.changes 2020-01-17 16:03:11.196377585 +0100 @@ -1,0 +2,13 @@ +Wed Jan 15 12:44:24 CET 2020 - sch...@suse.de + +- AY: Providing a "retry" button if a request timed out. + (bsc#1159277) +- 4.2.26 + +------------------------------------------------------------------- +Tue Jan 14 15:04:15 UTC 2020 - Josef Reidinger <jreidin...@suse.com> + +- fix crash in autoyast registration (bsc#1160909) +- 4.2.25 + +------------------------------------------------------------------- Old: ---- yast2-registration-4.2.24.tar.bz2 New: ---- yast2-registration-4.2.26.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-registration.spec ++++++ --- /var/tmp/diff_new_pack.k8kqHV/_old 2020-01-17 16:03:12.092378009 +0100 +++ /var/tmp/diff_new_pack.k8kqHV/_new 2020-01-17 16:03:12.092378009 +0100 @@ -17,7 +17,7 @@ Name: yast2-registration -Version: 4.2.24 +Version: 4.2.26 Release: 0 Summary: YaST2 - Registration Module License: GPL-2.0-only ++++++ yast2-registration-4.2.24.tar.bz2 -> yast2-registration-4.2.26.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.24/package/yast2-registration.changes new/yast2-registration-4.2.26/package/yast2-registration.changes --- old/yast2-registration-4.2.24/package/yast2-registration.changes 2020-01-10 16:59:46.000000000 +0100 +++ new/yast2-registration-4.2.26/package/yast2-registration.changes 2020-01-15 16:09:44.000000000 +0100 @@ -1,4 +1,17 @@ ------------------------------------------------------------------- +Wed Jan 15 12:44:24 CET 2020 - sch...@suse.de + +- AY: Providing a "retry" button if a request timed out. + (bsc#1159277) +- 4.2.26 + +------------------------------------------------------------------- +Tue Jan 14 15:04:15 UTC 2020 - Josef Reidinger <jreidin...@suse.com> + +- fix crash in autoyast registration (bsc#1160909) +- 4.2.25 + +------------------------------------------------------------------- Fri Jan 10 14:16:55 UTC 2020 - Ladislav Slezák <lsle...@suse.cz> - Load the old repositories before running the migration diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.24/package/yast2-registration.spec new/yast2-registration-4.2.26/package/yast2-registration.spec --- old/yast2-registration-4.2.24/package/yast2-registration.spec 2020-01-10 16:59:46.000000000 +0100 +++ new/yast2-registration-4.2.26/package/yast2-registration.spec 2020-01-15 16:09:44.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-registration -Version: 4.2.24 +Version: 4.2.26 Release: 0 Summary: YaST2 - Registration Module License: GPL-2.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.24/src/lib/registration/clients/scc_auto.rb new/yast2-registration-4.2.26/src/lib/registration/clients/scc_auto.rb --- old/yast2-registration-4.2.24/src/lib/registration/clients/scc_auto.rb 2020-01-10 16:59:46.000000000 +0100 +++ new/yast2-registration-4.2.26/src/lib/registration/clients/scc_auto.rb 2020-01-15 16:09:44.000000000 +0100 @@ -130,7 +130,7 @@ # special handling for the online installation medium, # we need to evaluate the base products defined in the control.xml - if Y2Packager::MediumType.online? + if Yast::Stage.initial && Y2Packager::MediumType.online? return false unless online_medium_config end @@ -335,10 +335,10 @@ # register the addons specified in the profile def register_addons # set the option for installing the updates for addons - options = Registration::Storage::InstallationOptions.instance + options = ::Registration::Storage::InstallationOptions.instance options.install_updates = @config.install_updates - ay_addons_handler = Registration::AutoyastAddons.new(@config.addons, registration) + ay_addons_handler = ::Registration::AutoyastAddons.new(@config.addons, registration) ay_addons_handler.select ay_addons_handler.register diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.24/src/lib/registration/connect_helpers.rb new/yast2-registration-4.2.26/src/lib/registration/connect_helpers.rb --- old/yast2-registration-4.2.24/src/lib/registration/connect_helpers.rb 2020-01-10 16:59:46.000000000 +0100 +++ new/yast2-registration-4.2.26/src/lib/registration/connect_helpers.rb 2020-01-15 16:09:44.000000000 +0100 @@ -80,9 +80,7 @@ rescue Timeout::Error => e # Error popup log.error "Timeout error: #{e.message}" - # FIXME: to not break existing translation, this typo should be fixed - # later after SP2: time -> timed - retry if report_error_and_retry?(message_prefix + _("Connection time out."), + retry if report_error_and_retry?(message_prefix + _("Connection timed out."), _("Make sure that the registration server is reachable and\n" \ "the connection is reliable.")) @@ -158,17 +156,19 @@ end def self.details_error(msg, error_message, retry_button: false) - if Yast::Mode.auto + if Yast::Mode.auto && !retry_button + # AY mode and no retry button available report_error(msg, error_message) - else - buttons = - if retry_button - { retry: Yast::Label.RetryButton, cancel: Yast::Label.CancelButton } - else - :ok - end - Yast2::Popup.show(msg, details: error_message, headline: :error, buttons: buttons) + return end + + buttons = + if retry_button + { retry: Yast::Label.RetryButton, cancel: Yast::Label.CancelButton } + else + :ok + end + Yast2::Popup.show(msg, details: error_message, headline: :error, buttons: buttons) end def self.report_error_and_retry?(msg, details_message) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.24/src/lib/registration/registration.rb new/yast2-registration-4.2.26/src/lib/registration/registration.rb --- old/yast2-registration-4.2.24/src/lib/registration/registration.rb 2020-01-10 16:59:46.000000000 +0100 +++ new/yast2-registration-4.2.26/src/lib/registration/registration.rb 2020-01-15 16:09:44.000000000 +0100 @@ -52,7 +52,11 @@ ) log.info "Announcing system with distro_target: #{distro_target}" - login, password = SUSE::Connect::YaST.announce_system(settings, distro_target) + login = "" + password = "" + ConnectHelpers.catch_registration_errors do + login, password = SUSE::Connect::YaST.announce_system(settings, distro_target) + end log.info "Global SCC credentials (username): #{login}" # write the global credentials @@ -210,7 +214,10 @@ log.info "Reading available updates for product: #{product["name"]}" remote_product = SwMgmt.remote_product(product) - updates = SUSE::Connect::YaST.list_installer_updates(remote_product, connect_params) + updates = [] + ConnectHelpers.catch_registration_errors do + updates = SUSE::Connect::YaST.list_installer_updates(remote_product, connect_params) + end log.info "Updates for '#{product["name"]}' are available at '#{updates}'" updates diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.24/test/connect_helpers_spec.rb new/yast2-registration-4.2.26/test/connect_helpers_spec.rb --- old/yast2-registration-4.2.24/test/connect_helpers_spec.rb 2020-01-10 16:59:46.000000000 +0100 +++ new/yast2-registration-4.2.26/test/connect_helpers_spec.rb 2020-01-15 16:09:44.000000000 +0100 @@ -59,13 +59,10 @@ context "and in AutoYaST mode" do let(:autoinst?) { true } - - it "reports an error with details on timeout" do - expect(subject).to receive(:wrap_text).with("Details: #{details}", screen_width - 4) - .and_return("Details wrapped text") - expect(Yast::Report).to receive(:Error).with( - "Registration: " + _("Connection time out.") + "\n\nDetails wrapped text" - ) + it "shows an error dialog with a retry and details button" do + expect(Yast2::Popup).to receive(:show) + # A retry should be provided. So no "common" AY error report. + expect(Yast::Report).not_to receive(:Error) helpers.catch_registration_errors(message_prefix: "Registration: ") do raise Timeout::Error @@ -76,7 +73,7 @@ context "and in a common installation" do it "shows an error dialog with a retry and details button" do expect(helpers).to receive(:report_error_and_retry?) - .with("Registration: " + _("Connection time out."), details) + .with("Registration: " + _("Connection timed out."), details) helpers.catch_registration_errors(message_prefix: "Registration: ") do raise Timeout::Error @@ -85,7 +82,7 @@ it "retries the given block if selected by the user" do expect(helpers).to receive(:report_error_and_retry?).twice - .with("Registration: " + _("Connection time out."), details).and_return(true, false) + .with("Registration: " + _("Connection timed out."), details).and_return(true, false) helpers.catch_registration_errors(message_prefix: "Registration: ") do raise Timeout::Error diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.24/test/migration_repos_workflow_spec.rb new/yast2-registration-4.2.26/test/migration_repos_workflow_spec.rb --- old/yast2-registration-4.2.24/test/migration_repos_workflow_spec.rb 2020-01-10 16:59:46.000000000 +0100 +++ new/yast2-registration-4.2.26/test/migration_repos_workflow_spec.rb 2020-01-15 16:09:44.000000000 +0100 @@ -205,7 +205,7 @@ .and_return([load_yaml_fixture("products_legacy_installation.yml")[1]]) expect_any_instance_of(Registration::RegistrationUI).to receive(:migration_products) .and_return([]) - expect(Yast::Report).to receive(:Error) + expect(Yast::Report).to receive(:Error).at_least(:once) expect(subject.run).to eq(:abort) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.24/test/registration/clients/scc_auto_test.rb new/yast2-registration-4.2.26/test/registration/clients/scc_auto_test.rb --- old/yast2-registration-4.2.24/test/registration/clients/scc_auto_test.rb 2020-01-10 16:59:46.000000000 +0100 +++ new/yast2-registration-4.2.26/test/registration/clients/scc_auto_test.rb 2020-01-15 16:09:44.000000000 +0100 @@ -101,6 +101,28 @@ subject.write end + it "registers previously registered base system and addons" do + allow(Yast::Mode).to receive(:update).and_return(false) + subject.import( + "do_registration" => true, + "addons" => [{ + "name" => "sle-module-basesystem", + "version" => "15.2", + "arch" => "x86_64" + }] + ) + + allow(subject).to receive(:registration_ui).and_return( + double(register_system_and_base_product: true, disable_update_repos: true) + ) + + addon = double.as_null_object + expect(Registration::AutoyastAddons).to receive(:new).and_return(addon) + expect(addon).to receive(:register) + + subject.write + end + context "in autoupgrade mode" do before do allow(Yast::Mode).to receive(:update).and_return(true)