Hello community, here is the log from the commit of package yast2-packager for openSUSE:Factory checked in at 2019-08-05 19:24:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-packager (Old) and /work/SRC/openSUSE:Factory/.yast2-packager.new.4126 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-packager" Mon Aug 5 19:24:43 2019 rev:377 rq:721082 version:4.2.23 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-packager/yast2-packager.changes 2019-07-31 14:25:56.598289024 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-packager.new.4126/yast2-packager.changes 2019-08-05 19:24:44.882148616 +0200 @@ -1,0 +2,7 @@ +Mon Aug 5 08:23:58 UTC 2019 - David Diaz <dgonza...@suse.com> + +- Select the forced base product during the repositories + initialization (bsc#1124590, bsc#1143943). +- 4.2.23 + +------------------------------------------------------------------- Old: ---- yast2-packager-4.2.22.tar.bz2 New: ---- yast2-packager-4.2.23.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-packager.spec ++++++ --- /var/tmp/diff_new_pack.S36aT6/_old 2019-08-05 19:24:45.398148701 +0200 +++ /var/tmp/diff_new_pack.S36aT6/_new 2019-08-05 19:24:45.402148701 +0200 @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.2.22 +Version: 4.2.23 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later @@ -47,8 +47,8 @@ Requires: yast2-country-data >= 2.16.3 # Pkg::Resolvables Requires: yast2-pkg-bindings >= 4.2.0 -# inst_rpmcopy.rb: SlideShow.RebuildDialog(true) -Requires: yast2 >= 4.2.8 +# Y2Packager::Product.forced_base_product +Requires: yast2 >= 4.2.17 # unzipping license file Requires: unzip # HTTP, FTP, HTTPS modules (inst_productsources.ycp) ++++++ yast2-packager-4.2.22.tar.bz2 -> yast2-packager-4.2.23.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.2.22/package/yast2-packager.changes new/yast2-packager-4.2.23/package/yast2-packager.changes --- old/yast2-packager-4.2.22/package/yast2-packager.changes 2019-07-26 15:44:42.000000000 +0200 +++ new/yast2-packager-4.2.23/package/yast2-packager.changes 2019-08-05 16:42:24.000000000 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Mon Aug 5 08:23:58 UTC 2019 - David Diaz <dgonza...@suse.com> + +- Select the forced base product during the repositories + initialization (bsc#1124590, bsc#1143943). +- 4.2.23 + +------------------------------------------------------------------- Fri Jul 26 11:28:16 UTC 2019 - Ladislav Slezák <lsle...@suse.cz> - Fixed product selection for single repositories: do not scan diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.2.22/package/yast2-packager.spec new/yast2-packager-4.2.23/package/yast2-packager.spec --- old/yast2-packager-4.2.22/package/yast2-packager.spec 2019-07-26 15:44:42.000000000 +0200 +++ new/yast2-packager-4.2.23/package/yast2-packager.spec 2019-08-05 16:42:24.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.2.22 +Version: 4.2.23 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later @@ -47,8 +47,8 @@ Requires: yast2-country-data >= 2.16.3 # Pkg::Resolvables Requires: yast2-pkg-bindings >= 4.2.0 -# inst_rpmcopy.rb: SlideShow.RebuildDialog(true) -Requires: yast2 >= 4.2.8 +# Y2Packager::Product.forced_base_product +Requires: yast2 >= 4.2.17 # unzipping license file Requires: unzip # HTTP, FTP, HTTPS modules (inst_productsources.ycp) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.2.22/src/lib/y2packager/clients/inst_repositories_initialization.rb new/yast2-packager-4.2.23/src/lib/y2packager/clients/inst_repositories_initialization.rb --- old/yast2-packager-4.2.22/src/lib/y2packager/clients/inst_repositories_initialization.rb 2019-07-26 15:44:42.000000000 +0200 +++ new/yast2-packager-4.2.23/src/lib/y2packager/clients/inst_repositories_initialization.rb 2019-08-05 16:42:24.000000000 +0200 @@ -88,7 +88,16 @@ # @see https://github.com/yast/yast-packager/blob/7e1a0bbb90823b03c15d92f408036a560dca8aa3/src/modules/Packages.rb#L1876 # @see https://github.com/yast/yast-packager/blob/fbc396df910e297915f9f785fc460e72e30d1948/src/modules/Packages.rb#L1905 def adjust_base_product_selection - if products.size == 1 + forced_base_product = Y2Packager::Product.forced_base_product + + if forced_base_product + log.info("control.xml wants to force the #{forced_base_product.name} product") + + forced_base_product.select + discarded_products = products.reject { |p| p == forced_base_product } + + log.info("Ignoring the other products: #{discarded_products.inspect}") + elsif products.size == 1 products.first.select else products.each(&:restore) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.2.22/test/lib/clients/inst_repositories_initialization_test.rb new/yast2-packager-4.2.23/test/lib/clients/inst_repositories_initialization_test.rb --- old/yast2-packager-4.2.22/test/lib/clients/inst_repositories_initialization_test.rb 2019-07-26 15:44:42.000000000 +0200 +++ new/yast2-packager-4.2.23/test/lib/clients/inst_repositories_initialization_test.rb 2019-08-05 16:42:24.000000000 +0200 @@ -7,8 +7,8 @@ subject(:client) { described_class.new } let(:success) { true } - let(:prod1) { instance_double(Y2Packager::Product, select: nil) } - let(:prod2) { instance_double(Y2Packager::Product, select: nil) } + let(:prod1) { instance_double(Y2Packager::Product, name: "Prod1", select: nil) } + let(:prod2) { instance_double(Y2Packager::Product, name: "Prod2", select: nil) } let(:products) { [prod1] } describe "#main" do @@ -16,6 +16,7 @@ allow(Yast::Packages).to receive(:InitializeCatalogs) allow(Yast::Packages).to receive(:InitializeAddOnProducts) allow(Yast::Packages).to receive(:InitFailed).and_return(!success) + allow(Y2Packager::Product).to receive(:forced_base_product) allow(Y2Packager::Product).to receive(:available_base_products).and_return(products) allow(Y2Packager::SelfUpdateAddonRepo).to receive(:present?).and_return(false) end @@ -62,6 +63,19 @@ client.main end end + + context "when a product is forced to be used" do + let(:products) { [prod1, prod2] } + + before do + allow(Y2Packager::Product).to receive(:forced_base_product).and_return(prod2) + end + + it "selects the product for installation" do + expect(prod2).to receive(:select) + client.main + end + end context "when more than one product is available" do let(:products) { [prod1, prod2] }