Script 'mail_helper' called by ro Hello packager, This is just FYI. Your package was checked in in distribution "sle12" by autobuild-member: ro. Here comes the log... ---------------------------%<------------------------------ Hi, here is the log from ci_new_pac /mounts/work_src_done/SLE12/yast2-registration -> sle12 ## BNC# 886423 : "yast2 scc - confusing registration server handling" (RESOLVED/FIXED) ## BNC# 886387 : "Automatic registration upgrade failed, cannot continue (build 533)" (RESOLVED/FIXED) Changes: -------- --- /work/SRC/SUSE:SLE-12:GA/yast2-registration/yast2-registration.changes 2014-07-08 13:31:18.000000000 +0200 +++ /mounts/work_src_done/SLE12/yast2-registration/yast2-registration.changes 2014-07-10 15:40:22.000000000 +0200 @@ -1,0 +2,10 @@ +Thu Jul 10 07:21:36 UTC 2014 - lslezak@suse.cz + +- skip SLP discovery if SMT is used, use the URL from config file + (bnc#886423) +- allow changing the registration server when re-registering +- reset registration status when upgrade fails to allow + re-registering from scratch (bnc#886387) +- 3.1.90 + +------------------------------------------------------------------- calling whatdependson for sle12-i586 Packages directly triggered for rebuild: - yast2-registration ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/SUSE:SLE-12:GA/yast2-registration (Old) and /mounts/work_src_done/SLE12/yast2-registration (BS:build ID:41051 MAIL:yast-commit@opensuse.org) (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2-registration", Maintainer is "yast-commit@opensuse.org" Old: ---- yast2-registration-3.1.88.tar.bz2 New: ---- yast2-registration-3.1.90.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-registration.spec ++++++ --- /var/tmp/diff_new_pack.1Kuf4e/_old 2014-07-10 16:39:06.000000000 +0200 +++ /var/tmp/diff_new_pack.1Kuf4e/_new 2014-07-10 16:39:06.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-registration -Version: 3.1.88 +Version: 3.1.90 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-registration-3.1.88.tar.bz2 -> yast2-registration-3.1.90.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.88/package/yast2-registration.changes new/yast2-registration-3.1.90/package/yast2-registration.changes --- old/yast2-registration-3.1.88/package/yast2-registration.changes 2014-07-08 13:20:33.000000000 +0200 +++ new/yast2-registration-3.1.90/package/yast2-registration.changes 2014-07-10 15:37:28.000000000 +0200 @@ -1,4 +1,14 @@ ------------------------------------------------------------------- +Thu Jul 10 07:21:36 UTC 2014 - lslezak@suse.cz + +- skip SLP discovery if SMT is used, use the URL from config file + (bnc#886423) +- allow changing the registration server when re-registering +- reset registration status when upgrade fails to allow + re-registering from scratch (bnc#886387) +- 3.1.90 + +------------------------------------------------------------------- Tue Jul 8 09:22:44 UTC 2014 - lslezak@suse.cz - fixed check for registered status (bnc#886116) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.88/package/yast2-registration.spec new/yast2-registration-3.1.90/package/yast2-registration.spec --- old/yast2-registration-3.1.88/package/yast2-registration.spec 2014-07-08 13:20:33.000000000 +0200 +++ new/yast2-registration-3.1.90/package/yast2-registration.spec 2014-07-10 15:37:28.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-registration -Version: 3.1.88 +Version: 3.1.90 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.88/src/clients/inst_scc.rb new/yast2-registration-3.1.90/src/clients/inst_scc.rb --- old/yast2-registration-3.1.88/src/clients/inst_scc.rb 2014-07-08 13:20:33.000000000 +0200 +++ new/yast2-registration-3.1.90/src/clients/inst_scc.rb 2014-07-10 15:37:28.000000000 +0200 @@ -111,7 +111,8 @@ ::Registration::Helpers::run_network_configuration when :local_server options = ::Registration::Storage::InstallationOptions.instance - url = ::Registration::UI::LocalServerDialog.run(options.custom_url) + current_url = options.custom_url || SUSE::Connect::Config.new.url + url = ::Registration::UI::LocalServerDialog.run(current_url) if url log.info "Entered custom URL: #{url}" options.custom_url = url @@ -173,7 +174,11 @@ return :next end - if !success + if success + # save the config if running in installed system + # (in installation/upgrade it's written in _finish client) + ::Registration::Helpers.write_config if Mode.normal + else log.info "registration failed, resetting the registration URL" # reset the registration object and the cache to allow changing the URL @registration = nil @@ -196,7 +201,7 @@ init_registration - ::Registration::SccHelpers.catch_registration_errors do + upgraded = ::Registration::SccHelpers.catch_registration_errors do # then register the product(s) base_product = ::Registration::SwMgmt.base_product_to_register product_services = Popup.Feedback( @@ -213,6 +218,13 @@ # select repositories to use in installation (e.g. enable/disable Updates) select_repositories(product_services) end + + if !upgraded + log.info "Registration upgrade failed, removing the credentials to register from scratch" + ::Registration::Helpers.reset_registration_status + end + + upgraded end def refresh_addons @@ -320,14 +332,12 @@ MinWidth(REG_CODE_WIDTH, InputField(Id(:reg_code), _("Registration &Code"), options.reg_code)) ) ), - registered ? Empty() : VBox( - VSpacing(1), - # button label - PushButton(Id(:local_server), _("&Local Registration Server...")), - VSpacing(UI.TextMode ? 1 : 3), - # button label - PushButton(Id(:skip), _("&Skip Registration")) - ), + VSpacing(1), + # button label + PushButton(Id(:local_server), _("&Local Registration Server...")), + VSpacing(UI.TextMode ? 1 : 3), + # button label + registered ? Empty() : PushButton(Id(:skip), _("&Skip Registration")), VStretch() ) end @@ -724,9 +734,7 @@ ::Registration::Storage::Cache.instance.first_run = false if Stage.initial && ::Registration::Registration.is_registered? - file = ::Registration::Registration::SCC_CREDENTIALS - log.info "Resetting registration status, removing #{file}" - File.unlink(file) + ::Registration::Helpers.reset_registration_status end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.88/src/lib/registration/finish_dialog.rb new/yast2-registration-3.1.90/src/lib/registration/finish_dialog.rb --- old/yast2-registration-3.1.88/src/lib/registration/finish_dialog.rb 2014-07-08 13:20:33.000000000 +0200 +++ new/yast2-registration-3.1.90/src/lib/registration/finish_dialog.rb 2014-07-10 15:37:29.000000000 +0200 @@ -43,15 +43,10 @@ Yast.import "Installation" - config_params = { - :url => Helpers.registration_url, - :insecure => Helpers.insecure_registration - } - - log.info "writing registration config: #{config_params}" - - SUSE::Connect::YaST.write_config(config_params) + # write the current config + Helpers.write_config + # copy it to the target system source_path = SUSE::Connect::Config::DEFAULT_CONFIG_FILE target_path = Yast::Installation.destdir + source_path diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.88/src/lib/registration/helpers.rb new/yast2-registration-3.1.90/src/lib/registration/helpers.rb --- old/yast2-registration-3.1.88/src/lib/registration/helpers.rb 2014-07-08 13:20:33.000000000 +0200 +++ new/yast2-registration-3.1.90/src/lib/registration/helpers.rb 2014-07-10 15:37:29.000000000 +0200 @@ -24,6 +24,7 @@ require "yast" require "uri" +require "registration/registration" require "registration/storage" require "registration/suse_register" require "suse/connect" @@ -195,8 +196,9 @@ custom_url = ::Registration::Storage::InstallationOptions.instance.custom_url return custom_url if custom_url && !custom_url.empty? - # TODO FIXME: read the URL from configuration file to use the same URL - # at re-registration as in installation + # check for previously saved config value + config = SUSE::Connect::Config.new + return config.url if config.url # try SLP if not registered yet slp_url = slp_service_url @@ -282,5 +284,26 @@ Yast::SCR.Execute(Yast::Path.new(".target.bash"), cmd) end end + + # write the current configuration to the configuration file + def self.write_config + config_params = { + :url => registration_url, + :insecure => insecure_registration + } + + log.info "writing registration config: #{config_params}" + + SUSE::Connect::YaST.write_config(config_params) + end + + def self.reset_registration_status + file = ::Registration::Registration::SCC_CREDENTIALS + return unless File.exist?(file) + + log.info "Resetting registration status, removing #{file}" + File.unlink(file) + end + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.88/test/helpers_spec.rb new/yast2-registration-3.1.90/test/helpers_spec.rb --- old/yast2-registration-3.1.88/test/helpers_spec.rb 2014-07-08 13:20:33.000000000 +0200 +++ new/yast2-registration-3.1.90/test/helpers_spec.rb 2014-07-10 15:37:29.000000000 +0200 @@ -218,4 +218,22 @@ end end + describe ".reset_registration_status" do + let(:credentials) { ::Registration::Registration::SCC_CREDENTIALS } + + it "does nothing if there are no system credentials present" do + expect(File).to receive(:exist?).with(credentials).and_return(false) + expect(File).to receive(:unlink).never + + expect {Registration::Helpers.reset_registration_status}.to_not raise_error + end + + it "removes system credentials if present" do + expect(File).to receive(:exist?).with(credentials).and_return(true) + expect(File).to receive(:unlink).with(credentials) + + expect {Registration::Helpers.reset_registration_status}.to_not raise_error + end + end + end continue with "q"... Checked in at Thu Jul 10 16:39:21 CEST 2014 by ro Remember to have fun... -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org