Hello community, here is the log from the commit of package yast2-installation for openSUSE:Factory checked in at 2019-08-05 18:25:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-installation (Old) and /work/SRC/openSUSE:Factory/.yast2-installation.new.4126 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-installation" Mon Aug 5 18:25:15 2019 rev:427 rq:721084 version:4.2.8 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-installation/yast2-installation.changes 2019-07-31 14:25:49.910294190 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-installation.new.4126/yast2-installation.changes 2019-08-05 18:25:16.766878926 +0200 @@ -1,0 +2,7 @@ +Mon Aug 5 08:43:21 UTC 2019 - David Diaz <[email protected]> + +- Improve the detection of a forced base product + (bsc#1124590, bsc#1143943). +- 4.2.8 + +------------------------------------------------------------------- Old: ---- yast2-installation-4.2.7.tar.bz2 New: ---- yast2-installation-4.2.8.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-installation.spec ++++++ --- /var/tmp/diff_new_pack.smXayX/_old 2019-08-05 18:25:17.330878752 +0200 +++ /var/tmp/diff_new_pack.smXayX/_new 2019-08-05 18:25:17.334878751 +0200 @@ -17,7 +17,7 @@ Name: yast2-installation -Version: 4.2.7 +Version: 4.2.8 Release: 0 Summary: YaST2 - Installation Parts License: GPL-2.0-only @@ -75,9 +75,10 @@ Requires: yast2-proxy # Systemd default target and services. This version supports # writing settings in the first installation stage. -Requires: yast2 >= 4.1.42 -Requires: yast2-network >= 4.0.13 Requires: yast2-services-manager >= 3.2.1 +# Y2Packager::Product.forced_base_product +Requires: yast2 >= 4.2.17 +Requires: yast2-network >= 4.0.13 # for AbortException and handle direct abort Requires: yast2-ruby-bindings >= 4.0.6 # for the first/second stage of installation ++++++ yast2-installation-4.2.7.tar.bz2 -> yast2-installation-4.2.8.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.2.7/package/yast2-installation.changes new/yast2-installation-4.2.8/package/yast2-installation.changes --- old/yast2-installation-4.2.7/package/yast2-installation.changes 2019-07-26 13:28:40.000000000 +0200 +++ new/yast2-installation-4.2.8/package/yast2-installation.changes 2019-08-05 16:42:37.000000000 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Mon Aug 5 08:43:21 UTC 2019 - David Diaz <[email protected]> + +- Improve the detection of a forced base product + (bsc#1124590, bsc#1143943). +- 4.2.8 + +------------------------------------------------------------------- Thu Jul 25 11:52:07 UTC 2019 - David Diaz <[email protected]> - Avoid to lost the focus in the proposal installation summary when diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.2.7/package/yast2-installation.spec new/yast2-installation-4.2.8/package/yast2-installation.spec --- old/yast2-installation-4.2.7/package/yast2-installation.spec 2019-07-26 13:28:40.000000000 +0200 +++ new/yast2-installation-4.2.8/package/yast2-installation.spec 2019-08-05 16:42:37.000000000 +0200 @@ -16,7 +16,7 @@ # Name: yast2-installation -Version: 4.2.7 +Version: 4.2.8 Release: 0 Group: System/YaST License: GPL-2.0-only @@ -75,7 +75,8 @@ # Systemd default target and services. This version supports # writing settings in the first installation stage. Requires: yast2-services-manager >= 3.2.1 -Requires: yast2 >= 4.1.42 +# Y2Packager::Product.forced_base_product +Requires: yast2 >= 4.2.17 Requires: yast2-network >= 4.0.13 # for AbortException and handle direct abort Requires: yast2-ruby-bindings >= 4.0.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.2.7/src/lib/installation/clients/inst_complex_welcome.rb new/yast2-installation-4.2.8/src/lib/installation/clients/inst_complex_welcome.rb --- old/yast2-installation-4.2.7/src/lib/installation/clients/inst_complex_welcome.rb 2019-07-26 13:28:40.000000000 +0200 +++ new/yast2-installation-4.2.8/src/lib/installation/clients/inst_complex_welcome.rb 2019-08-05 16:42:37.000000000 +0200 @@ -141,50 +141,22 @@ # Return the list of base products available # - # In update mode, when there are more than 1 product, this method will - # return an empty list because the dialog will not show the license (we do - # not know which product we are upgrading yet) nor the product selector - # (as you cannot change the product during upgrade). + # When a base product is being forced, the list will contains only it. # - # It could return a list with pre-selected product(s), @see #preselected_base_product. + # In update mode, when there are more than 1 product, this method will return an empty + # list because the dialog will not show the license (we do not know which product we are + # upgrading yet) nor the product selector (as you cannot change the product during upgrade). # - # @return [Array<Y2Packager::Product>] List of available base products; - # empty list in update mode. + # @return [Array<Y2Packager::Product>] List of available base products; if any, a list + # containing only the forced base product; empty list in update mode. def products return @products if @products - @products = preselected_base_product || available_base_products + @products = Array(Y2Packager::Product.forced_base_product || available_base_products) @products = [] if Mode.update && @products.size > 1 @products end - # Returns, if any, the preselected base product (bsc#1124590) - # - # A product can be pre-selected using the `select_product` element in the software section - # in the control file. - # - # @return [nil, Array<Y2Packager::Product>] nil when no preselected product in control file, - # a list containing the preselected base product, or - # empty list if preselected product is not available - def preselected_base_product - selected_product_name = ProductFeatures.GetStringFeature("software", "select_product") - - return if selected_product_name.empty? - - log.info("control.xml wants to preselect the #{selected_product_name} product") - - filtered_base_products = available_base_products.select do |product| - product.name == selected_product_name - end - discarded_base_products = available_base_products - filtered_base_products - - if !discarded_base_products.empty? - log.info("Ignoring the other available products: #{discarded_base_products.map(&:name)}") - end - - filtered_base_products - end - # Returns all available base products # # @return [Array<Y2Packager::Product>] List of available base products diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.2.7/test/lib/clients/inst_complex_welcome_test.rb new/yast2-installation-4.2.8/test/lib/clients/inst_complex_welcome_test.rb --- old/yast2-installation-4.2.7/test/lib/clients/inst_complex_welcome_test.rb 2019-07-26 13:28:40.000000000 +0200 +++ new/yast2-installation-4.2.8/test/lib/clients/inst_complex_welcome_test.rb 2019-08-05 16:42:37.000000000 +0200 @@ -54,6 +54,8 @@ ) end + let(:forced_base_product) { nil } + before do # fake yast2-country, to avoid additional build dependencies stub_const("Yast::Console", double.as_null_object) @@ -66,6 +68,7 @@ allow(Y2Packager::Product).to receive(:selected_base).and_return(product) allow(Y2Packager::Product).to receive(:available_base_products).and_return(products) + allow(Y2Packager::Product).to receive(:forced_base_product).and_return(forced_base_product) end describe "#main" do @@ -268,31 +271,15 @@ # Test the behavior when the product name is hardcoded in the control file, which solves the # issue with the wrong selected product during a network installation having multiples # products in a single repository, bsc#1124590 - context "and the control file contains a preselected product name" do + context "and there is a forced base product" do let(:products) { [product, other_product] } - let(:preselected_product) { "Other Product" } - - before do - allow(Yast::ProductFeatures).to receive(:GetStringFeature) - .with("software", "select_product") - .and_return(preselected_product) - end + let(:forced_base_product) { other_product } - it "runs the complex welcome dialog with the preselected product" do + it "runs the complex welcome dialog with the selected product" do expect(Installation::Dialogs::ComplexWelcome).to receive(:run) .with([other_product], anything) subject.main end - - context "but it does not match with available products" do - let(:preselected_product) { "Unknown product" } - - it "runs the complex welcome dialog with no products" do - expect(Installation::Dialogs::ComplexWelcome).to receive(:run) - .with([], anything) - subject.main - end - end end end
