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-packager -> sle12 ## BNC# 875350 : "Build0295: Minimal pattern does not install zypper" (NEEDINFO/) Changes: -------- --- /work/SRC/SUSE:SLE-12:GA/yast2-packager/yast2-packager.changes 2014-04-23 12:26:41.000000000 +0200 +++ /mounts/work_src_done/SLE12/yast2-packager/yast2-packager.changes 2014-04-28 16:08:12.000000000 +0200 @@ -1,0 +2,7 @@ +Mon Apr 28 13:55:39 CEST 2014 - locilka@suse.com + +- Logging status of all changed resolvables to be able to debug + and reproduce reported issues better (bnc#875350) +- 3.1.12 + +------------------------------------------------------------------- calling whatdependson for sle12-i586 Packages directly triggered for rebuild: - yast2-packager - at least 26 other packages ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/SUSE:SLE-12:GA/yast2-packager (Old) and /mounts/work_src_done/SLE12/yast2-packager (BS:build ID:36890 MAIL:yast-commit@opensuse.org) (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2-packager", Maintainer is "yast-commit@opensuse.org" Old: ---- yast2-packager-3.1.11.tar.bz2 New: ---- yast2-packager-3.1.12.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-packager.spec ++++++ --- /var/tmp/diff_new_pack.csRnvR/_old 2014-04-29 11:48:08.000000000 +0200 +++ /var/tmp/diff_new_pack.csRnvR/_new 2014-04-29 11:48:08.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 3.1.11 +Version: 3.1.12 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-packager-3.1.11.tar.bz2 -> yast2-packager-3.1.12.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.11/package/yast2-packager.changes new/yast2-packager-3.1.12/package/yast2-packager.changes --- old/yast2-packager-3.1.11/package/yast2-packager.changes 2014-04-23 10:55:59.000000000 +0200 +++ new/yast2-packager-3.1.12/package/yast2-packager.changes 2014-04-28 16:05:49.000000000 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Mon Apr 28 13:55:39 CEST 2014 - locilka@suse.com + +- Logging status of all changed resolvables to be able to debug + and reproduce reported issues better (bnc#875350) +- 3.1.12 + +------------------------------------------------------------------- Wed Apr 23 10:41:25 CEST 2014 - locilka@suse.com - Fixed function call that identified ComputeSystemPatternList diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.11/package/yast2-packager.spec new/yast2-packager-3.1.12/package/yast2-packager.spec --- old/yast2-packager-3.1.11/package/yast2-packager.spec 2014-04-23 10:55:59.000000000 +0200 +++ new/yast2-packager-3.1.12/package/yast2-packager.spec 2014-04-28 16:05:49.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 3.1.11 +Version: 3.1.12 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.11/src/clients/inst_rpmcopy.rb new/yast2-packager-3.1.12/src/clients/inst_rpmcopy.rb --- old/yast2-packager-3.1.11/src/clients/inst_rpmcopy.rb 2014-04-23 10:55:59.000000000 +0200 +++ new/yast2-packager-3.1.12/src/clients/inst_rpmcopy.rb 2014-04-28 16:05:49.000000000 +0200 @@ -153,6 +153,9 @@ # move the progress to the packages stage SlideShow.MoveToStage("packages") + # bnc#875350: Log the current user/app_high software selection + Packages.log_software_selection + # install packages from CD current_cd_no to CD maxnumbercds @result = InstallPackagesFromMedia(@current_cd_no, @maxnumbercds) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.11/src/modules/Packages.rb new/yast2-packager-3.1.12/src/modules/Packages.rb --- old/yast2-packager-3.1.11/src/modules/Packages.rb 2014-04-23 10:55:59.000000000 +0200 +++ new/yast2-packager-3.1.12/src/modules/Packages.rb 2014-04-28 16:05:49.000000000 +0200 @@ -11,6 +11,9 @@ class PackagesClass < Module include Yast::Logger + # All known types of resolvables + RESOLVABLE_TYPES = [:product, :patch, :package, :pattern, :language] + def main Yast.import "UI" Yast.import "Pkg" @@ -2379,8 +2382,49 @@ patterns.split(/[, \n]/).reject(&:empty?) end + # Log only resolvables with resolvable["status"] matching these below + LOG_RESOLVABLE_STATUS = [:selected, :removed] + + # Log only resolvables with resolvable["transact_by"] matching these below + LOG_RESOLVABLE_TRANSACT_BY = [:user, :app_high] + + # Reads the current user selection and dumps it to log + def log_software_selection + log.info "-" * 10 << " Transaction Status Begin " << "-" * 10 + + RESOLVABLE_TYPES.each do |type| + resolvables = Pkg.ResolvableProperties("", type, "") + resolvables.select!{ |r| LOG_RESOLVABLE_TRANSACT_BY.include? r["transact_by"] } + + LOG_RESOLVABLE_TRANSACT_BY.each do |transact_by| + changed_resolvables = resolvables.select{ |r| r["transact_by"] == transact_by} + next if changed_resolvables.empty? + + decided_resolvables = changed_resolvables.select{ |r| LOG_RESOLVABLE_STATUS.include? r["status"] } + log_resolvables("Resolvables of type #{type} set by #{transact_by}:", decided_resolvables) + + locked_resolvables = changed_resolvables.select{ |r| r["locked"] } + log_resolvables("Locked resolvables of type #{type} set by #{transact_by}:", locked_resolvables) + end + end + + log.info "-" * 10 << " Transaction Status End " << "-" * 10 + nil + end + private + def log_resolvables(text, resolvables) + return if resolvables.empty? + + log.info text + + resolvables.each do |r| + r_info = {:name => r["name"], :version => r["version"], :arch => r["arch"], :status => r["status"]} + log.info "- #{r_info}" + end + end + # Computes all patterns that are expected to be selected for default installation def patterns_to_install patterns = ComputeSystemPatternList() @@ -2433,6 +2477,7 @@ publish :function => :InitFailed, :type => "boolean ()" publish :function => :SelectKernelPackages, :type => "void ()" publish :function => :default_patterns, :type => "list <string> ()" + publish :function => :log_software_selection, :type => "void ()" end Packages = PackagesClass.new diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.11/test/data/zypp/products.yml new/yast2-packager-3.1.12/test/data/zypp/products.yml --- old/yast2-packager-3.1.11/test/data/zypp/products.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-packager-3.1.12/test/data/zypp/products.yml 2014-04-28 16:05:49.000000000 +0200 @@ -0,0 +1,109 @@ +--- +- arch: x86_64 + category: base + description: openSUSE is a distribution by the openSUSE.org project. + display_name: openSUSE (INSTALLED) + download_size: 0 + flags: [] + flavor: dvd-promo + inst_size: 0 + locked: false + medium_nr: 0 + name: openSUSE + product_file: /etc/products.d/openSUSE.prod + register_release: '' + register_target: openSUSE-13.1-x86_64 + relnotes_url: http://doc.opensuse.org/release-notes/x86_64/openSUSE/13.1/release-notes-ope... + relnotes_urls: + - http://doc.opensuse.org/release-notes/x86_64/openSUSE/13.1/release-notes-ope... + short_name: openSUSE + source: -1 + status: :installed + summary: openSUSE (installed on the system) + transact_by: :solver + type: base + update_urls: [] + upgrades: [] + vendor: openSUSE + version: 13.1-1.10 +- arch: x86_64 + category: base + description: openSUSE is a distribution by the openSUSE.org project. + display_name: openSUSE (LOCKED) + download_size: 0 + flags: [] + flavor: dvd-promo + inst_size: 0 + locked: true + medium_nr: 0 + name: openSUSE-locked + product_file: /etc/products.d/openSUSE.prod + register_release: '' + register_target: openSUSE-13.1-x86_64 + relnotes_url: http://doc.opensuse.org/release-notes/x86_64/openSUSE/13.1/release-notes-ope... + relnotes_urls: + - http://doc.opensuse.org/release-notes/x86_64/openSUSE/13.1/release-notes-ope... + short_name: openSUSE + source: -1 + status: :installed + summary: openSUSE (installed on the system) + transact_by: :user + type: base + update_urls: [] + upgrades: [] + vendor: openSUSE + version: 12.6-1.1.1.1 +- arch: x86_64 + category: base + description: openSUSE is a distribution by the openSUSE.org project. + display_name: openSUSE (selected for installation) + download_size: 0 + flags: [] + flavor: dvd-promo + inst_size: 0 + locked: false + medium_nr: 0 + name: openSUSE + product_file: /etc/products.d/openSUSE.prod + register_release: '' + register_target: openSUSE-13.1-x86_64 + relnotes_url: http://doc.opensuse.org/release-notes/x86_64/openSUSE/13.1/release-notes-ope... + relnotes_urls: + - http://doc.opensuse.org/release-notes/x86_64/openSUSE/13.1/release-notes-ope... + short_name: openSUSE + source: 0 + status: :selected + summary: openSUSE (selected for removal) + transact_by: :user + type: base + update_urls: [] + upgrades: [] + vendor: openSUSE + version: 13.1-1.10 +- arch: x86_64 + category: base + description: openSUSE is a distribution by the openSUSE.org project. + display_name: openSUSE (SELECTED) + download_size: 0 + flags: [] + flavor: dvd-promo + inst_size: 0 + locked: false + medium_nr: 0 + name: openSUSE + product_file: /etc/products.d/openSUSE.prod + register_release: '' + register_target: openSUSE-13.1-x86_64 + relnotes_url: http://doc.opensuse.org/release-notes/x86_64/openSUSE/13.1/release-notes-ope... + relnotes_urls: + - http://doc.opensuse.org/release-notes/x86_64/openSUSE/13.1/release-notes-ope... + short_name: openSUSE + source: 0 + status: :removed + summary: openSUSE (selected for installation) + transact_by: :app_high + type: base + update_urls: [] + upgrades: [] + vendor: openSUSE + version: 13.0-1.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.11/test/packages_test.rb new/yast2-packager-3.1.12/test/packages_test.rb --- old/yast2-packager-3.1.11/test/packages_test.rb 2014-04-23 10:56:00.000000000 +0200 +++ new/yast2-packager-3.1.12/test/packages_test.rb 2014-04-28 16:05:49.000000000 +0200 @@ -3,6 +3,9 @@ ENV["Y2DIR"] = File.expand_path("../../src", __FILE__) require "yast" +require "yaml" + +include Yast::Logger Yast.import "Packages" Yast.import "SCR" @@ -17,6 +20,17 @@ Regexp::IGNORECASE ) +# Path to a test data - service file - mocking the default data path +DATA_PATH = File.join(File.expand_path(File.dirname(__FILE__)), "data") + +def load_zypp(file_name) + file_name = File.join(DATA_PATH, "zypp", file_name) + log.info "Loading file: #{file_name}" + YAML.load_file(file_name) +end + +PRODUCTS_FROM_ZYPP = load_zypp('products.yml').freeze + describe Yast::Packages do describe "#kernelCmdLinePackages" do before(:each) do @@ -160,4 +174,17 @@ expect{ Yast::Packages.SelectSystemPatterns(true) }.to raise_error(/pattern/i) end end + + describe "#log_software_selection" do + it "logs all currently changed resolvables set by user or application (excluding solver)" do + Yast::Pkg.stub(:ResolvableProperties).and_return([]) + Yast::Pkg.stub(:ResolvableProperties).with("", :product, "").and_return(PRODUCTS_FROM_ZYPP.dup) + + expect(Yast::Y2Logger.instance).to receive(:info) do |msg| + expect(msg).to match(/(transaction status [begin|end]|(locked)?resolvables of type .* set by .*|:name=>.*:version=>)/i) + end.exactly(8).times.and_call_original + + expect(Yast::Packages.log_software_selection).to be_nil + end + end end continue with "q"... Checked in at Tue Apr 29 11:48:25 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