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-services-manager -> sle12 ## BNC# 888555 : "yast2-services-manager: error messages not cleared up" (ASSIGNED/) Changes: -------- --- /work/SRC/SUSE:SLE-12:GA/yast2-services-manager/yast2-services-manager.changes 2014-07-24 18:12:34.000000000 +0200 +++ /mounts/work_src_done/SLE12/yast2-services-manager/yast2-services-manager.changes 2014-07-25 15:21:55.000000000 +0200 @@ -1,0 +2,9 @@ +Tue Jul 25 12:40:31 UTC 2014 - ancor@suse.com + +- Ensures that the errors list is cleared if the user decides to + continue after a failure (by delegating ServiceManager.errors to + ServiceManagerService) +- Fixes bnc#888555 +- 3.1.27 + +------------------------------------------------------------------- calling whatdependson for sle12-i586 Packages directly triggered for rebuild: - yast2-services-manager - at least 20 other packages ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/SUSE:SLE-12:GA/yast2-services-manager (Old) and /mounts/work_src_done/SLE12/yast2-services-manager (BS:build ID:41831 MAIL:yast-commit@opensuse.org) (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2-services-manager", Maintainer is "yast-commit@opensuse.org" Old: ---- yast2-services-manager-3.1.26.tar.bz2 New: ---- yast2-services-manager-3.1.27.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-services-manager.spec ++++++ --- /var/tmp/diff_new_pack.wVmVAm/_old 2014-07-25 16:15:01.000000000 +0200 +++ /var/tmp/diff_new_pack.wVmVAm/_new 2014-07-25 16:15:01.000000000 +0200 @@ -24,7 +24,7 @@ ###################################################################### Name: yast2-services-manager -Version: 3.1.26 +Version: 3.1.27 Release: 0 BuildArch: noarch ++++++ yast2-services-manager-3.1.26.tar.bz2 -> yast2-services-manager-3.1.27.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-services-manager-3.1.26/package/yast2-services-manager.changes new/yast2-services-manager-3.1.27/package/yast2-services-manager.changes --- old/yast2-services-manager-3.1.26/package/yast2-services-manager.changes 2014-07-24 12:05:57.000000000 +0200 +++ new/yast2-services-manager-3.1.27/package/yast2-services-manager.changes 2014-07-25 15:19:11.000000000 +0200 @@ -1,4 +1,13 @@ ------------------------------------------------------------------- +Tue Jul 25 12:40:31 UTC 2014 - ancor@suse.com + +- Ensures that the errors list is cleared if the user decides to + continue after a failure (by delegating ServiceManager.errors to + ServiceManagerService) +- Fixes bnc#888555 +- 3.1.27 + +------------------------------------------------------------------- Thu Jul 24 11:55:32 CEST 2014 - locilka@suse.com - While saving services state (activate/deactivate), do not touch diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-services-manager-3.1.26/package/yast2-services-manager.spec new/yast2-services-manager-3.1.27/package/yast2-services-manager.spec --- old/yast2-services-manager-3.1.26/package/yast2-services-manager.spec 2014-07-24 12:05:57.000000000 +0200 +++ new/yast2-services-manager-3.1.27/package/yast2-services-manager.spec 2014-07-25 15:19:11.000000000 +0200 @@ -24,7 +24,7 @@ ###################################################################### Name: yast2-services-manager -Version: 3.1.26 +Version: 3.1.27 Release: 0 BuildArch: noarch diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-services-manager-3.1.26/src/clients/services-manager.rb new/yast2-services-manager-3.1.27/src/clients/services-manager.rb --- old/yast2-services-manager-3.1.26/src/clients/services-manager.rb 2014-07-24 12:05:57.000000000 +0200 +++ new/yast2-services-manager-3.1.27/src/clients/services-manager.rb 2014-07-25 15:19:11.000000000 +0200 @@ -72,8 +72,6 @@ success = ServicesManager.save UI.CloseDialog if !success - # FIXME if user select to continue the content of the popup is not discarded - # and new error messages will be displayed beneath the old ones success = ! Popup::ContinueCancel( _("Writing the configuration failed:\n" + ServicesManager.errors.join("\n") + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-services-manager-3.1.26/src/modules/services_manager.rb new/yast2-services-manager-3.1.27/src/modules/services_manager.rb --- old/yast2-services-manager-3.1.26/src/modules/services_manager.rb 2014-07-24 12:05:57.000000000 +0200 +++ new/yast2-services-manager-3.1.27/src/modules/services_manager.rb 2014-07-25 15:19:11.000000000 +0200 @@ -12,11 +12,8 @@ TARGET = 'default_target' SERVICES = 'services' - attr_reader :errors - def initialize textdomain 'services-manager' - @errors = [] end def export @@ -52,13 +49,19 @@ ServicesManagerService.read end + # Errors are delegated to ServiceManagerService + # + # @see ServiceManagerService#errors + def errors + ServicesManagerService.errors + end + # Saves the current configuration # # @return Boolean if successful def save target_saved = ServicesManagerTarget.save services_saved = ServicesManagerService.save - errors << ServicesManagerService.errors !!(target_saved && services_saved) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-services-manager-3.1.26/test/services_manager_service_test.rb new/yast2-services-manager-3.1.27/test/services_manager_service_test.rb --- old/yast2-services-manager-3.1.26/test/services_manager_service_test.rb 2014-07-24 12:05:57.000000000 +0200 +++ new/yast2-services-manager-3.1.27/test/services_manager_service_test.rb 2014-07-25 15:19:11.000000000 +0200 @@ -3,14 +3,17 @@ require_relative "test_helper" module Yast + extend Yast::I18n + Yast::textdomain "services-manager" + describe ServicesManagerService do attr_reader :service def stub_services - Service.stub(:Enable).and_return(true) - Service.stub(:Disable).and_return(true) - Service.stub(:Start).and_return(true) - Service.stub(:Stop).and_return(true) + allow(Service).to receive(:Enable).and_return true + allow(Service).to receive(:Disable).and_return true + allow(Service).to receive(:Start).and_return true + allow(Service).to receive(:Stop).and_return true end before do @@ -139,5 +142,29 @@ expect(sshd[:active]).to eq(status) expect(sshd[:modified]).to eq(false) end + + context "when enabling is failing" do + before do + stub_services + allow(Service).to receive(:Enable).and_return false + allow(Service).to receive(:Disable).and_return false + service.toggle 'postfix' + service.save + end + + it "reports errors" do + expect(service.errors.first).to start_with Yast::_('Could not enable postfix') + end + + it "cleans messages after reset" do + expect(service.errors.size).to eq 1 + service.reset + expect(service.errors.size).to eq 0 + # Let's fail again + service.toggle 'postfix' + service.save + expect(service.errors.size).to eq 1 + end + end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-services-manager-3.1.26/test/services_manager_test.rb new/yast2-services-manager-3.1.27/test/services_manager_test.rb --- old/yast2-services-manager-3.1.26/test/services_manager_test.rb 2014-07-24 12:05:57.000000000 +0200 +++ new/yast2-services-manager-3.1.27/test/services_manager_test.rb 2014-07-25 15:19:11.000000000 +0200 @@ -31,6 +31,13 @@ allow(Yast::ServicesManagerTarget).to receive(:targets).and_return(TARGETS) end + describe ".errors" do + it "delegates errors to ServiceManagerService" do + allow(Yast::ServicesManagerService).to receive(:errors).and_return(["Error msg"]) + expect(Yast::ServicesManager.errors).to eq ["Error msg"] + end + end + context "Autoyast API" do it "exports systemd target and services" do services = { continue with "q"... Checked in at Fri Jul 25 16:15:11 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