Hello community, here is the log from the commit of package yast2 for openSUSE:Factory checked in at 2018-03-11 18:02:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2 (Old) and /work/SRC/openSUSE:Factory/.yast2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2" Sun Mar 11 18:02:00 2018 rev:421 rq:583841 version:4.0.58 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2/yast2.changes 2018-03-04 11:49:58.743827332 +0100 +++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2018-03-11 18:02:02.917851759 +0100 @@ -1,0 +2,6 @@ +Wed Mar 7 07:12:27 UTC 2018 - igonzalezs...@suse.com + +- Use the correct release notes URL during upgrade (bsc#1073488). +- 4.0.58 + +------------------------------------------------------------------- @@ -6 +12 @@ -- 4.0.55 +- 4.0.56 Old: ---- yast2-4.0.56.tar.bz2 New: ---- yast2-4.0.58.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2.spec ++++++ --- /var/tmp/diff_new_pack.kS1SKD/_old 2018-03-11 18:02:03.961814333 +0100 +++ /var/tmp/diff_new_pack.kS1SKD/_new 2018-03-11 18:02:03.965814190 +0100 @@ -17,10 +17,10 @@ Name: yast2 -Version: 4.0.56 +Version: 4.0.58 Release: 0 Summary: YaST2 - Main Package -License: GPL-2.0 +License: GPL-2.0-only Group: System/YaST Url: https://github.com/yast/yast-yast2 Source0: %{name}-%{version}.tar.bz2 ++++++ yast2-4.0.56.tar.bz2 -> yast2-4.0.58.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.56/library/packages/src/lib/y2packager/product.rb new/yast2-4.0.58/library/packages/src/lib/y2packager/product.rb --- old/yast2-4.0.56/library/packages/src/lib/y2packager/product.rb 2018-02-28 14:20:36.000000000 +0100 +++ new/yast2-4.0.58/library/packages/src/lib/y2packager/product.rb 2018-03-07 11:17:47.000000000 +0100 @@ -243,6 +243,18 @@ ReleaseNotesReader.new(self).release_notes(user_lang: user_lang, format: format) end + # Return release notes URL + # + # Release notes might not be defined in libzypp and this method returns the URL + # to get release notes from. + # + # @return [String,nil] Release notes URL or nil if it is not defined. + def relnotes_url + return nil unless resolvable_properties + url = resolvable_properties["relnotes_url"] + url.empty? ? nil : url + end + # Determine whether a product is in a given status # # Only the 'name' will be used to find out whether the product status, @@ -256,5 +268,18 @@ statuses.include?(res["status"]) end end + + # Return product's resolvable properties + # + # Only the 'name' and 'version' will be used to find out the product + # properties, ignoring the architecture, vendor or any other property. + # libzypp will take care of finding the proper product. + # + # @return [Hash] properties + def resolvable_properties + @resolvable_properties ||= Yast::Pkg.ResolvableProperties(name, :product, "").find do |data| + data["version"] == version + end + end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.56/library/packages/src/lib/y2packager/release_notes_fetchers/url.rb new/yast2-4.0.58/library/packages/src/lib/y2packager/release_notes_fetchers/url.rb --- old/yast2-4.0.56/library/packages/src/lib/y2packager/release_notes_fetchers/url.rb 2018-02-28 14:20:36.000000000 +0100 +++ new/yast2-4.0.58/library/packages/src/lib/y2packager/release_notes_fetchers/url.rb 2018-03-07 11:17:47.000000000 +0100 @@ -200,7 +200,7 @@ # # @return [Boolean] def relnotes_url_valid? - if relnotes_url.nil? || relnotes_url.empty? + if relnotes_url.nil? log.error "No release notes URL for #{product.name}" return false end @@ -217,9 +217,7 @@ # # @return [String] Release notes URL def relnotes_url - return @relnotes_url if @relnotes_url - data = Yast::Pkg.ResolvableProperties(product.name, :product, "").first - @relnotes_url = data["relnotes_url"] + @relnotes_url ||= product.relnotes_url end # Return release notes URL diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.56/library/packages/test/y2packager/product_test.rb new/yast2-4.0.58/library/packages/test/y2packager/product_test.rb --- old/yast2-4.0.56/library/packages/test/y2packager/product_test.rb 2018-02-28 14:20:36.000000000 +0100 +++ new/yast2-4.0.58/library/packages/test/y2packager/product_test.rb 2018-03-07 11:17:47.000000000 +0100 @@ -394,4 +394,36 @@ end end end + + describe "#relnotes_url" do + let(:relnotes_url) { "http://doc.opensuse.org/openSUSE/release-notes-openSUSE.rpm" } + + before do + allow(Yast::Pkg).to receive(:ResolvableProperties).with(product.name, :product, "") + .and_return([{ "version" => product.version, "relnotes_url" => relnotes_url }]) + end + + it "returns relnotes_url property" do + expect(product.relnotes_url).to eq(relnotes_url) + end + + context "when relnotes_url property is empty" do + let(:relnotes_url) { "" } + + it "returns nil" do + expect(product.relnotes_url).to be_nil + end + end + + context "when product properties are not found" do + before do + allow(Yast::Pkg).to receive(:ResolvableProperties).with(product.name, :product, "") + .and_return([]) + end + + it "returns nil" do + expect(product.relnotes_url).to be_nil + end + end + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.56/library/packages/test/y2packager/release_notes_fetchers/url_test.rb new/yast2-4.0.58/library/packages/test/y2packager/release_notes_fetchers/url_test.rb --- old/yast2-4.0.56/library/packages/test/y2packager/release_notes_fetchers/url_test.rb 2018-02-28 14:20:36.000000000 +0100 +++ new/yast2-4.0.58/library/packages/test/y2packager/release_notes_fetchers/url_test.rb 2018-03-07 11:17:47.000000000 +0100 @@ -7,7 +7,7 @@ describe Y2Packager::ReleaseNotesFetchers::Url do subject(:fetcher) { described_class.new(product) } - let(:product) { instance_double(Y2Packager::Product, name: "dummy") } + let(:product) { instance_double(Y2Packager::Product, name: "dummy", relnotes_url: relnotes_url) } let(:relnotes_url) { "http://doc.opensuse.org/openSUSE/release-notes-openSUSE.rpm" } let(:content) { "Release Notes\n" } let(:curl_retcode) { 0 } @@ -29,8 +29,6 @@ let(:prefs) { Y2Packager::ReleaseNotesContentPrefs.new(user_lang, fallback_lang, format) } before do - allow(Yast::Pkg).to receive(:ResolvableProperties) - .with(product.name, :product, "").and_return(["relnotes_url" => relnotes_url]) allow(File).to receive(:read).with(/relnotes/).and_return(content) allow(Yast::SCR).to receive(:Execute) .with(Yast::Path.new(".target.bash"), /curl.*directory.yast/) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.56/package/yast2.changes new/yast2-4.0.58/package/yast2.changes --- old/yast2-4.0.56/package/yast2.changes 2018-02-28 14:20:36.000000000 +0100 +++ new/yast2-4.0.58/package/yast2.changes 2018-03-07 11:17:47.000000000 +0100 @@ -1,9 +1,15 @@ ------------------------------------------------------------------- +Wed Mar 7 07:12:27 UTC 2018 - igonzalezs...@suse.com + +- Use the correct release notes URL during upgrade (bsc#1073488). +- 4.0.58 + +------------------------------------------------------------------- Wed Feb 28 13:03:21 UTC 2018 - an...@suse.com - Fixed a typo and the list item marker in the firewall widget (bsc#1083058). -- 4.0.55 +- 4.0.56 ------------------------------------------------------------------- Tue Feb 27 15:19:25 CET 2018 - sch...@suse.de diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.56/package/yast2.spec new/yast2-4.0.58/package/yast2.spec --- old/yast2-4.0.56/package/yast2.spec 2018-02-28 14:20:36.000000000 +0100 +++ new/yast2-4.0.58/package/yast2.spec 2018-03-07 11:17:47.000000000 +0100 @@ -16,7 +16,7 @@ # Name: yast2 -Version: 4.0.56 +Version: 4.0.58 Release: 0 Summary: YaST2 - Main Package License: GPL-2.0