Hello community, here is the log from the commit of package yast2-installation for openSUSE:Leap:15.2 checked in at 2020-03-13 10:55:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/yast2-installation (Old) and /work/SRC/openSUSE:Leap:15.2/.yast2-installation.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-installation" Fri Mar 13 10:55:19 2020 rev:162 rq:781942 version:4.2.36 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/yast2-installation/yast2-installation.changes 2020-02-27 06:41:21.149590755 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.yast2-installation.new.3160/yast2-installation.changes 2020-03-13 10:55:21.588348462 +0100 @@ -1,0 +2,6 @@ +Thu Feb 27 15:03:36 UTC 2020 - Stefan Hundhammer <shundham...@suse.com> + +- Make sure to show release notes for add-on products (bsc#1158287) +- 4.2.36 + +------------------------------------------------------------------- Old: ---- yast2-installation-4.2.35.tar.bz2 New: ---- yast2-installation-4.2.36.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-installation.spec ++++++ --- /var/tmp/diff_new_pack.caD0IH/_old 2020-03-13 10:55:22.760349298 +0100 +++ /var/tmp/diff_new_pack.caD0IH/_new 2020-03-13 10:55:22.768349303 +0100 @@ -17,7 +17,7 @@ Name: yast2-installation -Version: 4.2.35 +Version: 4.2.36 Release: 0 Summary: YaST2 - Installation Parts License: GPL-2.0-only ++++++ yast2-installation-4.2.35.tar.bz2 -> yast2-installation-4.2.36.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.2.35/package/yast2-installation.changes new/yast2-installation-4.2.36/package/yast2-installation.changes --- old/yast2-installation-4.2.35/package/yast2-installation.changes 2020-02-21 13:28:20.000000000 +0100 +++ new/yast2-installation-4.2.36/package/yast2-installation.changes 2020-03-05 11:47:47.000000000 +0100 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Feb 27 15:03:36 UTC 2020 - Stefan Hundhammer <shundham...@suse.com> + +- Make sure to show release notes for add-on products (bsc#1158287) +- 4.2.36 + +------------------------------------------------------------------- Fri Feb 21 09:45:10 UTC 2020 - Ladislav Slezák <lsle...@suse.cz> - Added "yupdate" script to simplify patching the installer diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.2.35/package/yast2-installation.spec new/yast2-installation-4.2.36/package/yast2-installation.spec --- old/yast2-installation-4.2.35/package/yast2-installation.spec 2020-02-21 13:28:20.000000000 +0100 +++ new/yast2-installation-4.2.36/package/yast2-installation.spec 2020-03-05 11:47:47.000000000 +0100 @@ -16,7 +16,7 @@ # Name: yast2-installation -Version: 4.2.35 +Version: 4.2.36 Release: 0 Group: System/YaST License: GPL-2.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.2.35/src/lib/installation/clients/inst_download_release_notes.rb new/yast2-installation-4.2.36/src/lib/installation/clients/inst_download_release_notes.rb --- old/yast2-installation-4.2.35/src/lib/installation/clients/inst_download_release_notes.rb 2020-02-21 13:28:20.000000000 +0100 +++ new/yast2-installation-4.2.36/src/lib/installation/clients/inst_download_release_notes.rb 2020-03-05 11:47:47.000000000 +0100 @@ -27,6 +27,7 @@ # $Id$ require "y2packager/product" +require "y2packager/product_reader" Yast.import "InstData" Yast.import "Pkg" @@ -100,10 +101,15 @@ def products # installed may mean old (before upgrade) in initial stage # product may not yet be selected although repo is already added - return Y2Packager::Product.with_status(:selected, :installed) unless Stage.initial - selected = Y2Packager::Product.with_status(:selected) + # + # Don't rely on Product.with_status() here, use force_repos (bsc#1158287): + # Otherwise we will only get products from the control file in the case + # of online media, and that means only base products, no add-ons. + all_products = Y2Packager::ProductReader.new.all_products(force_repos: true) + return all_products.select { |p| p.status?(:selected, :installed) } unless Stage.initial + selected = all_products.select { |p| p.status?(:selected) } return selected unless selected.empty? - Y2Packager::Product.with_status(:available) + all_products.select { |p| p.status?(:available) } end # Refresh release notes UI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.2.35/test/lib/clients/inst_download_release_notes_test.rb new/yast2-installation-4.2.36/test/lib/clients/inst_download_release_notes_test.rb --- old/yast2-installation-4.2.35/test/lib/clients/inst_download_release_notes_test.rb 2020-02-21 13:28:20.000000000 +0100 +++ new/yast2-installation-4.2.36/test/lib/clients/inst_download_release_notes_test.rb 2020-03-05 11:47:47.000000000 +0100 @@ -9,6 +9,7 @@ describe "#main" do let(:sles_relnotes) { instance_double(Y2Packager::ReleaseNotes, content: "SLES RN") } let(:sdk_relnotes) { instance_double(Y2Packager::ReleaseNotes, content: "SDK RN") } + let(:products) { [sles, sdk] } let(:language) { double("Yast::Language", language: "en_US") } let(:sles) do @@ -19,13 +20,24 @@ instance_double(Y2Packager::Product, short_name: "SDK", release_notes: sdk_relnotes) end + let(:prod_reader) do + instance_double(Y2Packager::ProductReader) + end + let(:textmode) { true } let(:packages_init_called) { true } + let(:sles_selected) { true } + let(:sdk_selected) { true } before do allow(Yast::UI).to receive(:TextMode).and_return(textmode) - allow(Y2Packager::Product).to receive(:with_status).with(:selected) - .and_return([sles, sdk]) + allow(Y2Packager::ProductReader).to receive(:new).and_return(prod_reader) + allow(prod_reader).to receive(:all_products) + .with(force_repos: true).and_return(products) + allow(sles).to receive(:status?).with(:selected).and_return(sles_selected) + allow(sdk).to receive(:status?).with(:selected).and_return(sdk_selected) + allow(sles).to receive(:status?).with(:available).and_return(false) + allow(sdk).to receive(:status?).with(:available).and_return(!sdk_selected) allow(Yast::Stage).to receive(:initial).and_return(true) allow(Yast::Packages).to receive(:init_called).and_return(packages_init_called) stub_const("Yast::Language", language) @@ -102,7 +114,7 @@ end end - context "when Packages module has not be initialized" do + context "when the Packages module has not been initialized" do let(:packages_init_called) { false } it "returns :auto" do @@ -119,24 +131,22 @@ end end - context "when some package is selected" do - let(:products) do - { selected: [sles], available: [sdk] } - end + context "when some module is selected" do + let(:sles_selected) { true } + let(:sdk_selected) { false } - it "shows release notes for 'selected' packages" do + it "shows release notes for 'selected' modules" do expect(sles).to receive(:release_notes) expect(sdk).to_not receive(:release_notes) client.main end end - context "when no package is selected" do - let(:products) do - { selected: [], available: [sdk], installed: [sles] } - end + context "when no module is selected" do + let(:sles_selected) { false } + let(:sdk_selected) { false } - it "shows release notes for 'available' packages" do + it "shows release notes for 'available' modules" do expect(sles).to_not receive(:release_notes) expect(sdk).to receive(:release_notes) client.main @@ -145,16 +155,17 @@ context "when not running on initial stage" do let(:other_product) { double("Y2Packager::Product") } - - let(:products) do - { available: [other_product], selected: [sdk], installed: [sles] } - end + let(:products) { [other_product, sles, sdk] } before do allow(Yast::Stage).to receive(:initial).and_return(false) + allow(other_product).to receive(:status?).with(:selected).and_return(false) + allow(other_product).to receive(:status?).with(:selected, :installed).and_return(false) + allow(sles).to receive(:status?).with(:selected, :installed).and_return(true) + allow(sdk).to receive(:status?).with(:selected, :installed).and_return(true) end - it "shows release notes for 'selected' and 'available' packages" do + it "shows release notes for 'selected' and 'available' modules" do expect(sles).to receive(:release_notes) expect(sdk).to receive(:release_notes) expect(other_product).to_not receive(:release_notes)