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# 873366 : "Build0262: Bootloader not written correctly" (RESOLVED/FIXED) Changes: -------- --- /work/SRC/SUSE:SLE-12:GA/yast2/yast2.changes 2014-04-10 17:21:33.000000000 +0200 +++ /mounts/work_src_done/SLE12/yast2/yast2.changes 2014-04-14 15:48:10.000000000 +0200 @@ -1,0 +2,10 @@ +Mon Apr 14 15:11:22 CEST 2014 - locilka@suse.com + +- Changed OSRelease not to read content file instead of os-release + file in inst-sys (bnc#873366) +- Changed Product to use OSRelease.ReleaseInformation as :name + instead of creating it from ReleaseName and ReleaseVersion, + these are only used as fallback (bnc#873366) +- 3.1.45 + +------------------------------------------------------------------- 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:36278 MAIL:yast-commit@opensuse.org) (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2", Maintainer is "yast-commit@opensuse.org" Old: ---- yast2-3.1.44.tar.bz2 New: ---- yast2-3.1.45.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2.spec ++++++ --- /var/tmp/diff_new_pack.2UiGzi/_old 2014-04-14 17:49:07.000000000 +0200 +++ /var/tmp/diff_new_pack.2UiGzi/_new 2014-04-14 17:49:07.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2 -Version: 3.1.44 +Version: 3.1.45 Release: 0 URL: https://github.com/yast/yast-yast2 ++++++ yast2-3.1.44.tar.bz2 -> yast2-3.1.45.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.44/library/general/src/modules/OSRelease.rb new/yast2-3.1.45/library/general/src/modules/OSRelease.rb --- old/yast2-3.1.44/library/general/src/modules/OSRelease.rb 2014-04-10 13:13:41.000000000 +0200 +++ new/yast2-3.1.45/library/general/src/modules/OSRelease.rb 2014-04-14 15:39:42.000000000 +0200 @@ -49,7 +49,7 @@ # # @param [String] directory containing the installed system (/ in installed system) # @return [String] the release information - def ReleaseInformation(directory) + def ReleaseInformation(directory = "/") release_file = File.join(directory, OS_RELEASE_PATH) if !os_release_exists?(directory) @@ -60,29 +60,21 @@ ) end - MakeNiceName(Misc.CustomSysconfigRead("PRETTY_NAME", "?", release_file)) + MakeNiceName(Misc.CustomSysconfigRead("PRETTY_NAME", "", release_file)) end # Get information about the OS name # Is limited for the currently running product # @return [String] the release information - def ReleaseName - if Stage.initial - return SCR.Read(path(".content.PRODUCT")) - end - directory = "/" # TODO make this optional argument - Misc.CustomSysconfigRead("NAME", "SUSE LINUX", directory + OS_RELEASE_PATH) + def ReleaseName(directory = "/") + Misc.CustomSysconfigRead("NAME", "SUSE Linux", File.join(directory, OS_RELEASE_PATH)) end # Get information about the OS version # Is limited for the currently running product # @return [String] the release information - def ReleaseVersion - if Stage.initial - return SCR.Read(path(".content.VERSION")) - end - directory = "/" - Misc.CustomSysconfigRead("VERSION_ID", "", directory + OS_RELEASE_PATH) + def ReleaseVersion(directory = "/") + Misc.CustomSysconfigRead("VERSION_ID", "", File.join(directory, OS_RELEASE_PATH)) end # Returns whether os-release file exists in the given directory diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.44/library/general/test/data/os-release_SLES_12_Beta5 new/yast2-3.1.45/library/general/test/data/os-release_SLES_12_Beta5 --- old/yast2-3.1.44/library/general/test/data/os-release_SLES_12_Beta5 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-3.1.45/library/general/test/data/os-release_SLES_12_Beta5 2014-04-14 15:39:42.000000000 +0200 @@ -0,0 +1,7 @@ +NAME="SLES" +VERSION="12" +VERSION_ID="12" +PRETTY_NAME="SUSE Linux Enterprise Server 12" +ID="sles" +ANSI_COLOR="0;32" +CPE_NAME="cpe:/o:suse:sles:12" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.44/library/general/test/data/os-release_openSUSE_13.1_GM new/yast2-3.1.45/library/general/test/data/os-release_openSUSE_13.1_GM --- old/yast2-3.1.44/library/general/test/data/os-release_openSUSE_13.1_GM 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-3.1.45/library/general/test/data/os-release_openSUSE_13.1_GM 2014-04-14 15:39:42.000000000 +0200 @@ -0,0 +1,10 @@ +NAME=openSUSE +VERSION="13.1 (Bottle)" +VERSION_ID="13.1" +PRETTY_NAME="openSUSE 13.1 (Bottle) (x86_64)" +ID=opensuse +ANSI_COLOR="0;32" +CPE_NAME="cpe:/o:opensuse:opensuse:13.1" +BUG_REPORT_URL="https://bugs.opensuse.org" +HOME_URL="https://opensuse.org/" +ID_LIKE="suse" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.44/library/general/test/os_release_test.rb new/yast2-3.1.45/library/general/test/os_release_test.rb --- old/yast2-3.1.44/library/general/test/os_release_test.rb 2014-04-10 13:13:41.000000000 +0200 +++ new/yast2-3.1.45/library/general/test/os_release_test.rb 2014-04-14 15:39:42.000000000 +0200 @@ -8,19 +8,56 @@ Yast.import "FileUtils" Yast.import "Misc" +DATA_DIR = File.join(File.expand_path(File.dirname(__FILE__)), "data") + describe Yast::OSRelease do describe "#ReleaseInformation" do - it "returns product name if release file exists" do - Yast::FileUtils.stub(:Exists).and_return(true) - Yast::Misc.stub(:CustomSysconfigRead).and_return("openSUSE 13.1 (Bottle) (x86_64)") - expect(Yast::OSRelease.ReleaseInformation("/mnt")).to eq "openSUSE 13.1" + context "when product name contains code name, architecture, etc." do + it "returns product name if release file exists" do + Yast::FileUtils.stub(:Exists).and_return(true) + Yast::Misc.stub(:CustomSysconfigRead).and_return("openSUSE 13.1 (Bottle) (x86_64)") + expect(Yast::OSRelease.ReleaseInformation("/mnt")).to eq "openSUSE 13.1" + end + end + + context "when the os-release file doesn't exist" do + it "throws exception Yast::OSReleaseFileMissingError" do + Yast::FileUtils.stub(:Exists).and_return(false) + expect { Yast::OSRelease.ReleaseInformation("/mnt") }.to raise_error( + Yast::OSReleaseFileMissingError + ) + end + end + + context "while working with custom os-release file" do + it "returns full product name" do + stub_const("Yast::OSReleaseClass::OS_RELEASE_PATH", "os-release_SLES_12_Beta5") + expect(Yast::OSRelease.ReleaseInformation(DATA_DIR)).to eq("SUSE Linux Enterprise Server 12") + + stub_const("Yast::OSReleaseClass::OS_RELEASE_PATH", "os-release_openSUSE_13.1_GM") + # cuts out code name, architecture, etc. + expect(Yast::OSRelease.ReleaseInformation(DATA_DIR)).to eq("openSUSE 13.1") + end end + end + + describe "#ReleaseName" do + it "returns a release name" do + stub_const("Yast::OSReleaseClass::OS_RELEASE_PATH", "os-release_SLES_12_Beta5") + expect(Yast::OSRelease.ReleaseName(DATA_DIR)).to eq("SLES") + + stub_const("Yast::OSReleaseClass::OS_RELEASE_PATH", "os-release_openSUSE_13.1_GM") + expect(Yast::OSRelease.ReleaseName(DATA_DIR)).to eq("openSUSE") + end + end + + describe "#ReleaseVersion" do + it "returns a release version" do + stub_const("Yast::OSReleaseClass::OS_RELEASE_PATH", "os-release_SLES_12_Beta5") + expect(Yast::OSRelease.ReleaseVersion(DATA_DIR)).to eq("12") - it "throws exception Yast::OSReleaseFileMissingError if release file does not exist" do - Yast::FileUtils.stub(:Exists).and_return(false) - expect { Yast::OSRelease.ReleaseInformation("/mnt") }.to raise_error( - Yast::OSReleaseFileMissingError - ) + stub_const("Yast::OSReleaseClass::OS_RELEASE_PATH", "os-release_openSUSE_13.1_GM") + expect(Yast::OSRelease.ReleaseVersion(DATA_DIR)).to eq("13.1") end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.44/library/packages/src/modules/Product.rb new/yast2-3.1.45/library/packages/src/modules/Product.rb --- old/yast2-3.1.44/library/packages/src/modules/Product.rb 2014-04-10 13:13:41.000000000 +0200 +++ new/yast2-3.1.45/library/packages/src/modules/Product.rb 2014-04-14 15:39:42.000000000 +0200 @@ -33,6 +33,9 @@ module Yast class ProductClass < Module + include Yast::Logger + + CONTENT_FILE = "/content" def main @@ -239,7 +242,12 @@ def read_os_release_file @short_name = OSRelease.ReleaseName @version = OSRelease.ReleaseVersion - @name = "#{@short_name} #{@version}" + + @name = OSRelease.ReleaseInformation("/") + if @name.empty? + @name = "#{@short_name} #{@version}" + log.warn "OSRelease.ReleaseInformation is empty, using default product name: #{@name}" + end end publish :variable => :name, :type => "string" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.44/library/packages/test/product_test.rb new/yast2-3.1.45/library/packages/test/product_test.rb --- old/yast2-3.1.44/library/packages/test/product_test.rb 2014-04-10 13:13:41.000000000 +0200 +++ new/yast2-3.1.45/library/packages/test/product_test.rb 2014-04-14 15:39:42.000000000 +0200 @@ -48,7 +48,7 @@ end describe Yast::Product do - context "while called in initial installation (content file exists)" do + context "while called on a system without os-release file (and content file exists)" do before(:each) do Yast::Product.stub(:can_use_content_file?).and_return(true) Yast::Product.stub(:can_use_os_release_file?).and_return(false) @@ -71,45 +71,63 @@ end end - context "while called on a running system (os-release file exists)" do + context "while called on a system with os-release file" do before(:each) do Yast::Product.stub(:can_use_content_file?).and_return(false) Yast::Product.stub(:can_use_os_release_file?).and_return(true) end - it "reads product information from OSRelease and fills up internal variables" do - release_name = "Happy Feet" - release_version = "1.0.1" - - Yast::OSRelease.stub(:ReleaseName).and_return(release_name) - Yast::OSRelease.stub(:ReleaseVersion).and_return(release_version) - - Yast::Product.Product - expect(Yast::Product.short_name).to eq(release_name) - expect(Yast::Product.version).to eq(release_version) - expect(Yast::Product.name).to eq("#{release_name} #{release_version}") + # This is the default behavior + context "OSRelease.ReleaseInformation is not empty" do + it "reads product information from OSRelease and fills up internal variables" do + release_info = "Happy Feet 2.0" + Yast::OSRelease.stub(:ReleaseInformation).and_return(release_info) + + Yast::Product.Product + expect(Yast::Product.name).to eq(release_info) + end + end + + # This is the fallback behavior + context "OSRelease.ReleaseInformation empty" do + it "reads product information from OSRelease and fills up internal variables" do + release_name = "Happy Feet" + release_version = "1.0.1" + + Yast::OSRelease.stub(:ReleaseInformation).and_return("") + Yast::OSRelease.stub(:ReleaseName).and_return(release_name) + Yast::OSRelease.stub(:ReleaseVersion).and_return(release_version) + + Yast::Product.Product + expect(Yast::Product.short_name).to eq(release_name) + expect(Yast::Product.version).to eq(release_version) + expect(Yast::Product.name).to eq("#{release_name} #{release_version}") + end end end - context "while called on a system with both content and os-release files supported" do + context "while called on a system having both content and os-release files" do before(:each) do Yast::Product.stub(:can_use_content_file?).and_return(true) Yast::Product.stub(:can_use_os_release_file?).and_return(true) end - it "prefers os-release file to content file" do - load_content_file("SLES_12_Beta4") - - release_name = "Happy Feet" - release_version = "1.0.1" - - Yast::OSRelease.stub(:ReleaseName).and_return(release_name) - Yast::OSRelease.stub(:ReleaseVersion).and_return(release_version) - - Yast::Product.Product - expect(Yast::Product.name).to eq("#{release_name} #{release_version}") - expect(Yast::Product.short_name).to eq(release_name) - expect(Yast::Product.short_name).not_to eq("SUSE Linux Enterprise Server 12") + context "OSRelease.ReleaseInformation empty" do + it "prefers os-release file to content file" do + load_content_file("SLES_12_Beta4") + + release_name = "Happy Feet" + release_version = "1.0.1" + + Yast::OSRelease.stub(:ReleaseInformation).and_return("") + Yast::OSRelease.stub(:ReleaseName).and_return(release_name) + Yast::OSRelease.stub(:ReleaseVersion).and_return(release_version) + + Yast::Product.Product + expect(Yast::Product.name).to eq("#{release_name} #{release_version}") + expect(Yast::Product.short_name).to eq(release_name) + expect(Yast::Product.short_name).not_to eq("SUSE Linux Enterprise Server 12") + end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.44/package/yast2.changes new/yast2-3.1.45/package/yast2.changes --- old/yast2-3.1.44/package/yast2.changes 2014-04-10 13:13:42.000000000 +0200 +++ new/yast2-3.1.45/package/yast2.changes 2014-04-14 15:39:42.000000000 +0200 @@ -1,4 +1,14 @@ ------------------------------------------------------------------- +Mon Apr 14 15:11:22 CEST 2014 - locilka@suse.com + +- Changed OSRelease not to read content file instead of os-release + file in inst-sys (bnc#873366) +- Changed Product to use OSRelease.ReleaseInformation as :name + instead of creating it from ReleaseName and ReleaseVersion, + these are only used as fallback (bnc#873366) +- 3.1.45 + +------------------------------------------------------------------- Thu Apr 10 11:07:13 CEST 2014 - locilka@suse.com - Prefering os-release file to content file (which is used only as diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.44/package/yast2.spec new/yast2-3.1.45/package/yast2.spec --- old/yast2-3.1.44/package/yast2.spec 2014-04-10 13:13:42.000000000 +0200 +++ new/yast2-3.1.45/package/yast2.spec 2014-04-14 15:39:42.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2 -Version: 3.1.44 +Version: 3.1.45 Release: 0 URL: https://github.com/yast/yast-yast2 continue with "q"... Checked in at Mon Apr 14 17:49:23 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