[yast-commit] [ci_new_pac] JFYI yast2 -> sle12
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 -> sle12 ## BNC# 873458 : "Build0266: "undefined methods for nil:Nilclass" in inst_prepareprogress.rb:51" (RESOLVED/FIXED) ## BNC# 873377 : "Build0263: "undefined methods for nil:Nilclass" in inst_scc.rb:161" (NEEDINFO/) Changes: -------- --- /work/SRC/SUSE:SLE-12:GA/yast2/yast2.changes 2014-04-14 17:49:22.000000000 +0200 +++ /mounts/work_src_done/SLE12/yast2/yast2.changes 2014-04-15 09:37:33.000000000 +0200 @@ -1,0 +2,7 @@ +Tue Apr 15 09:09:57 CEST 2014 - locilka@suse.com + +- Changed Product.FindBaseProducts to throw an exception if no + base products are found in installation (bnc#873458, bnc#873377) +- 3.1.46 + +------------------------------------------------------------------- calling whatdependson for sle12-i586 Packages directly triggered for rebuild: - yast2 - at least 73 other packages ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/SUSE:SLE-12:GA/yast2 (Old) and /mounts/work_src_done/SLE12/yast2 (BS:build ID:36333 MAIL:yast-commit@opensuse.org) (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2", Maintainer is "yast-commit@opensuse.org" Old: ---- yast2-3.1.45.tar.bz2 New: ---- yast2-3.1.46.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2.spec ++++++ --- /var/tmp/diff_new_pack.MOlfTT/_old 2014-04-15 10:13:12.000000000 +0200 +++ /var/tmp/diff_new_pack.MOlfTT/_new 2014-04-15 10:13:12.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2 -Version: 3.1.45 +Version: 3.1.46 Release: 0 URL: https://github.com/yast/yast-yast2 ++++++ yast2-3.1.45.tar.bz2 -> yast2-3.1.46.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.45/library/packages/src/modules/Product.rb new/yast2-3.1.46/library/packages/src/modules/Product.rb --- old/yast2-3.1.45/library/packages/src/modules/Product.rb 2014-04-14 15:39:42.000000000 +0200 +++ new/yast2-3.1.46/library/packages/src/modules/Product.rb 2014-04-15 09:28:36.000000000 +0200 @@ -35,7 +35,6 @@ include Yast::Logger - CONTENT_FILE = "/content" def main @@ -121,6 +120,7 @@ Builtins.y2milestone("Found base products: %1", products) if Builtins.size(products) == 0 Builtins.y2error("No base product found") + raise "No base product for installation found" if Stage.initial elsif Ops.greater_than(Builtins.size(products), 1) Builtins.y2warning("More than one base product found") end @@ -243,7 +243,7 @@ @short_name = OSRelease.ReleaseName @version = OSRelease.ReleaseVersion - @name = OSRelease.ReleaseInformation("/") + @name = OSRelease.ReleaseInformation if @name.empty? @name = "#{@short_name} #{@version}" log.warn "OSRelease.ReleaseInformation is empty, using default product name: #{@name}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.45/library/packages/test/data/zypp/products.yml new/yast2-3.1.46/library/packages/test/data/zypp/products.yml --- old/yast2-3.1.45/library/packages/test/data/zypp/products.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-3.1.46/library/packages/test/data/zypp/products.yml 2014-04-15 09:28:36.000000000 +0200 @@ -0,0 +1,55 @@ +--- +- 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 + 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 (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: :selected + summary: openSUSE + transact_by: :solver + type: base + update_urls: [] + upgrades: [] + vendor: openSUSE + version: 13.1-1.10 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.45/library/packages/test/product_test.rb new/yast2-3.1.46/library/packages/test/product_test.rb --- old/yast2-3.1.45/library/packages/test/product_test.rb 2014-04-14 15:39:42.000000000 +0200 +++ new/yast2-3.1.46/library/packages/test/product_test.rb 2014-04-15 09:28:36.000000000 +0200 @@ -5,6 +5,7 @@ ENV["Y2DIR"] = inc_dirs.join(":") require "yast" +require "yaml" # Important: Loads data in constructor Yast.import "Product" @@ -12,16 +13,21 @@ Yast.import "Mode" Yast.import "Stage" Yast.import "OSRelease" +Yast.import "PackageSystem" +Yast.import "Pkg" +Yast.import "PackageLock" +Yast.import "Mode" +Yast.import "Stage" include Yast::Logger # Path to a test data - service file - mocking the default data path -DATA_PATH = File.join(File.expand_path(File.dirname(__FILE__)), "data", "content_files") +DATA_PATH = File.join(File.expand_path(File.dirname(__FILE__)), "data") SCR_PATH = Yast::Path.new(".content") def load_content_file(file_name) - file_name = File.join(DATA_PATH, file_name) + file_name = File.join(DATA_PATH, "content_files", file_name) raise "File not found: #{file_name}" unless File.exists?(file_name) @@ -47,6 +53,14 @@ ) end +def load_zypp(file_name) + file_name = File.join(DATA_PATH, "zypp", file_name) + + raise "File not found: #{file_name}" unless File.exists?(file_name) + + YAML.load_file(file_name) +end + describe Yast::Product do context "while called on a system without os-release file (and content file exists)" do before(:each) do @@ -141,4 +155,42 @@ expect { Yast::Product.Product }.to raise_error(/Cannot determine the product/) end end + + ZYPP_PRODUCTS = load_zypp('products.yml') + + describe "#ReadProducts" do + before (:each) do + # FIXME: Method that needs that much stubbing needs refactoring + Yast::Pkg.stub(:ResolvableProperties).with("", :product, "").and_return(ZYPP_PRODUCTS) + Yast::PackageSystem.stub(:EnsureTargetInit).and_return(true) + Yast::PackageSystem.stub(:EnsureSourceInit).and_return(true) + Yast::Pkg.stub(:PkgSolve).and_return(true) + Yast::PackageLock.stub(:Check).and_return(true) + end + + context "while called in initial installation" do + it "reads products from zypp and selects first :selected base product" do + Yast::Mode.stub(:mode).and_return("installation") + Yast::Stage.stub(:stage).and_return("initial") + Yast::Product.ReadProducts + expect(Yast::Product.name).to eq("openSUSE (SELECTED)") + end + + it "raises an exception if no bse product is selected" do + Yast::Mode.stub(:mode).and_return("installation") + Yast::Stage.stub(:stage).and_return("initial") + Yast::Pkg.stub(:ResolvableProperties).with("", :product, "").and_return([]) + expect { Yast::Product.ReadProducts }.to raise_error(/No base product/) + end + end + + context "while called on a running system" do + it "reads products from zypp and selects first :installed base product" do + Yast::Mode.stub(:mode).and_return("normal") + Yast::Stage.stub(:stage).and_return("normal") + Yast::Product.ReadProducts + expect(Yast::Product.name).to eq("openSUSE (INSTALLED)") + end + end + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.45/package/yast2.changes new/yast2-3.1.46/package/yast2.changes --- old/yast2-3.1.45/package/yast2.changes 2014-04-14 15:39:42.000000000 +0200 +++ new/yast2-3.1.46/package/yast2.changes 2014-04-15 09:28:36.000000000 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Tue Apr 15 09:09:57 CEST 2014 - locilka@suse.com + +- Changed Product.FindBaseProducts to throw an exception if no + base products are found in installation (bnc#873458, bnc#873377) +- 3.1.46 + +------------------------------------------------------------------- Mon Apr 14 15:11:22 CEST 2014 - locilka@suse.com - Changed OSRelease not to read content file instead of os-release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.45/package/yast2.spec new/yast2-3.1.46/package/yast2.spec --- old/yast2-3.1.45/package/yast2.spec 2014-04-14 15:39:42.000000000 +0200 +++ new/yast2-3.1.46/package/yast2.spec 2014-04-15 09:28:36.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2 -Version: 3.1.45 +Version: 3.1.46 Release: 0 URL: https://github.com/yast/yast-yast2 continue with "q"... Checked in at Tue Apr 15 10:13:36 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
participants (1)
-
ro