Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package yast2-installation for openSUSE:Factory checked in at 2021-11-20 02:38:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-installation (Old) and /work/SRC/openSUSE:Factory/.yast2-installation.new.1895 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-installation" Sat Nov 20 02:38:13 2021 rev:482 rq:931577 version:4.4.22 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-installation/yast2-installation.changes 2021-11-09 23:53:45.799926698 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-installation.new.1895/yast2-installation.changes 2021-11-20 02:38:34.988890441 +0100 @@ -1,0 +2,9 @@ +Fri Nov 12 14:08:02 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com> + +- bsc#1192626: + - Adapt the code to the new product specification API. + - Remove the code to handle the selected product from the + InstComplexWelcome client. +- 4.4.22 + +------------------------------------------------------------------- Old: ---- yast2-installation-4.4.21.tar.bz2 New: ---- yast2-installation-4.4.22.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-installation.spec ++++++ --- /var/tmp/diff_new_pack.SVse0G/_old 2021-11-20 02:38:35.748887933 +0100 +++ /var/tmp/diff_new_pack.SVse0G/_new 2021-11-20 02:38:35.752887920 +0100 @@ -17,7 +17,7 @@ Name: yast2-installation -Version: 4.4.21 +Version: 4.4.22 Release: 0 Summary: YaST2 - Installation Parts License: GPL-2.0-only @@ -28,8 +28,8 @@ Source2: YaST2-Firstboot.service BuildRequires: update-desktop-files -# Yast2::FsSnapshotStore::IOError -BuildRequires: yast2 >= 4.3.53 +# ProductSpec API +BuildRequires: yast2 >= 4.4.21 # CIOIgnore BuildRequires: yast2-bootloader # storage-ng based version @@ -39,8 +39,8 @@ BuildRequires: yast2-firewall # Y2Network::ProposalSettings #modify_defaults and #apply_defaults (forwarding configurable) BuildRequires: yast2-network >= 4.4.12 -# Y2Packager::InstallationData -BuildRequires: yast2-packager >= 4.4.2 +# ProductSpec API +BuildRequires: yast2-packager >= 4.4.13 # for AbortException and handle direct abort BuildRequires: yast2-ruby-bindings >= 4.0.6 # For selinux classes @@ -70,8 +70,8 @@ Requires: pciutils # tar-gzip some system files and untar-ungzip them after the installation (FATE #300421, #120103) Requires: tar -# Installation::InstallationInfo -Requires: yast2 >= 4.4.4 +# ProductSpec API +Requires: yast2 >= 4.4.21 # CIOIgnore Requires: yast2-bootloader Requires: yast2-country >= 3.3.1 @@ -80,8 +80,8 @@ Requires: yast2-country-data >= 2.16.11 # Y2Network::ProposalSettings #modify_defaults and #apply_defaults (forwarding configurable) Requires: yast2-network >= 4.4.12 -# Y2Packager::InstallationData -Requires: yast2-packager >= 4.4.2 +# ProductSpec API +Requires: yast2-packager >= 4.4.13 # Pkg::ProvidePackage Requires: yast2-pkg-bindings >= 3.1.33 # Proxy settings for 2nd stage (bnc#764951) ++++++ yast2-installation-4.4.21.tar.bz2 -> yast2-installation-4.4.22.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.21/package/yast2-installation.changes new/yast2-installation-4.4.22/package/yast2-installation.changes --- old/yast2-installation-4.4.21/package/yast2-installation.changes 2021-11-03 16:35:34.000000000 +0100 +++ new/yast2-installation-4.4.22/package/yast2-installation.changes 2021-11-15 15:53:19.000000000 +0100 @@ -1,4 +1,13 @@ ------------------------------------------------------------------- +Fri Nov 12 14:08:02 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com> + +- bsc#1192626: + - Adapt the code to the new product specification API. + - Remove the code to handle the selected product from the + InstComplexWelcome client. +- 4.4.22 + +------------------------------------------------------------------- Mon Nov 1 12:48:19 UTC 2021 - Martin Vidner <mvid...@suse.com> - Filter the installation proposals (in the Installation Settings diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.21/package/yast2-installation.spec new/yast2-installation-4.4.22/package/yast2-installation.spec --- old/yast2-installation-4.4.21/package/yast2-installation.spec 2021-11-03 16:35:34.000000000 +0100 +++ new/yast2-installation-4.4.22/package/yast2-installation.spec 2021-11-15 15:53:19.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-installation -Version: 4.4.21 +Version: 4.4.22 Release: 0 Summary: YaST2 - Installation Parts License: GPL-2.0-only @@ -28,8 +28,8 @@ Source2: YaST2-Firstboot.service BuildRequires: update-desktop-files -# Yast2::FsSnapshotStore::IOError -BuildRequires: yast2 >= 4.3.53 +# ProductSpec API +BuildRequires: yast2 >= 4.4.21 # CIOIgnore BuildRequires: yast2-bootloader # storage-ng based version @@ -39,8 +39,8 @@ BuildRequires: yast2-firewall # Y2Network::ProposalSettings #modify_defaults and #apply_defaults (forwarding configurable) BuildRequires: yast2-network >= 4.4.12 -# Y2Packager::InstallationData -BuildRequires: yast2-packager >= 4.4.2 +# ProductSpec API +BuildRequires: yast2-packager >= 4.4.13 # for AbortException and handle direct abort BuildRequires: yast2-ruby-bindings >= 4.0.6 # For selinux classes @@ -70,8 +70,8 @@ Requires: pciutils # tar-gzip some system files and untar-ungzip them after the installation (FATE #300421, #120103) Requires: tar -# Installation::InstallationInfo -Requires: yast2 >= 4.4.4 +# ProductSpec API +Requires: yast2 >= 4.4.21 # CIOIgnore Requires: yast2-bootloader Requires: yast2-country >= 3.3.1 @@ -80,8 +80,8 @@ Requires: yast2-country-data >= 2.16.11 # Y2Network::ProposalSettings #modify_defaults and #apply_defaults (forwarding configurable) Requires: yast2-network >= 4.4.12 -# Y2Packager::InstallationData -Requires: yast2-packager >= 4.4.2 +# ProductSpec API +Requires: yast2-packager >= 4.4.13 # Pkg::ProvidePackage Requires: yast2-pkg-bindings >= 3.1.33 # Proxy settings for 2nd stage (bnc#764951) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.21/src/lib/installation/clients/inst_complex_welcome.rb new/yast2-installation-4.4.22/src/lib/installation/clients/inst_complex_welcome.rb --- old/yast2-installation-4.4.21/src/lib/installation/clients/inst_complex_welcome.rb 2021-11-03 16:35:34.000000000 +0100 +++ new/yast2-installation-4.4.22/src/lib/installation/clients/inst_complex_welcome.rb 2021-11-15 15:53:19.000000000 +0100 @@ -26,10 +26,7 @@ require "installation/dialogs/complex_welcome" require "y2packager/medium_type" -require "y2packager/product" -require "y2packager/product_control_product" -require "y2packager/product_location" -require "y2packager/product_sorter" +require "y2packager/product_spec" Yast.import "Console" Yast.import "FileUtils" @@ -46,7 +43,6 @@ Yast.import "Stage" Yast.import "Timezone" Yast.import "Wizard" -Yast.import "WorkflowManager" module Yast # This client shows main dialog for choosing the language, keyboard, @@ -77,12 +73,7 @@ products, disable_buttons: disable_buttons ) result = handle_dialog_result(dialog_result) - next unless result - - return result if !available_products? || result != :next - # in the online installation the workflow is merged after registering the system - return result if Y2Packager::MediumType.online? - return merge_and_run_workflow + return result if result end end @@ -113,14 +104,6 @@ end end - # Merge selected product's workflow and go to next step - # - # @see Yast::WorkflowManager.merge_product_workflow - def merge_and_run_workflow - Yast::WorkflowManager.merge_product_workflow(selected_product) - Yast::ProductControl.RunFrom(Yast::ProductControl.CurrentStep + 1, true) - end - # Set up system according to user choices def setup_final_choice # Language has been set already. @@ -158,44 +141,21 @@ # 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>, Array<Y2Packager::ProductControlProduct, Array<Y2Packager::ProductLocation>] List of - # available base products; if any, a list containing only the forced base product; - # empty list in update mode. + # @return [Array<Y2Packager::ProductSpec>] 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 = Array(Y2Packager::Product.forced_base_product || available_base_products) + @products = Array(Y2Packager::ProductSpec.forced_base_product || available_base_products) @products = [] if Mode.update && @products.size > 1 @products end # Returns all available base products # - # @return [Array<Y2Packager::Product>, Array<Y2Packager::ProductControlProduct>, Array<Y2Packager::ProductLocation>] List of - # available base products + # @return [Array<Y2Packager::ProductSpec>] List of available base products def available_base_products - return @available_base_products if @available_base_products - - case Y2Packager::MediumType.type - when :online - # read the products from the control.xml - @available_base_products = Y2Packager::ProductControlProduct.products - log.info "Found base products in the control.xml: #{@available_base_products.pretty_inspect}" - - # we cannot continue, the control.xml in the installer is invalid - raise "control.xml does not define any base products!" if @available_base_products.empty? - when :offline - url = InstURL.installInf2Url("") - @available_base_products = Y2Packager::ProductLocation - .scan(url) - .select { |p| p.details && p.details.base } - .sort(&::Y2Packager::PRODUCT_SORTER) - log.info "Found base products on the offline medium: #{@available_base_products.pretty_inspect}" - else - @available_base_products = Y2Packager::Product.available_base_products - end - - @available_base_products + @available_base_products ||= Y2Packager::ProductSpec.base_products end # Determine whether some product is available or not @@ -207,13 +167,10 @@ # Convenience method to find out the selected base product # - # @return [Y2Packager::Product] Selected base product + # @return [Y2Packager::ProductSpec,nil] Selected base product. When no product is selected, + # it returns nil. def selected_product - if Y2Packager::MediumType.online? - Y2Packager::ProductControlProduct.selected - else - Y2Packager::Product.selected_base - end + Y2Packager::ProductSpec.selected_base end # Buttons to disable according to GetInstArgs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.21/src/lib/installation/proposal_runner.rb new/yast2-installation-4.4.22/src/lib/installation/proposal_runner.rb --- old/yast2-installation-4.4.21/src/lib/installation/proposal_runner.rb 2021-11-03 16:35:34.000000000 +0100 +++ new/yast2-installation-4.4.22/src/lib/installation/proposal_runner.rb 2021-11-15 15:53:19.000000000 +0100 @@ -72,6 +72,8 @@ # BNC #463567 @submods_already_called = [] + # NOTE: it would be better to receive the object already initialized. Why? Because if it + # needs some argument, we do not know how to handle it. @store_class = store @errors = ProposalErrors.new end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.21/src/lib/installation/widgets/product_selector.rb new/yast2-installation-4.4.22/src/lib/installation/widgets/product_selector.rb --- old/yast2-installation-4.4.21/src/lib/installation/widgets/product_selector.rb 2021-11-03 16:35:34.000000000 +0100 +++ new/yast2-installation-4.4.22/src/lib/installation/widgets/product_selector.rb 2021-11-15 15:53:19.000000000 +0100 @@ -1,7 +1,7 @@ require "yast" require "y2packager/medium_type" -require "y2packager/product_control_product" +require "y2packager/product_sorter" Yast.import "Pkg" Yast.import "Popup" @@ -18,11 +18,11 @@ attr_reader :items, :products attr_reader :product - # @param products [Array<Installation::Product>] to display + # @param products [Array<Y2Packager::Product>] products to display # @param skip_validation [Boolean] Skip value validation def initialize(products, skip_validation: false) @products = products - @items = products.map { |p| [item_id(p), p.label] } + @items = products.sort(&Y2Packager::PRODUCT_SORTER).map { |p| [item_id(p), p.label] } @skip_validation = skip_validation textdomain "installation" end @@ -52,34 +52,7 @@ return unless @product - # online product from control.xml - if @product.is_a?(Y2Packager::ProductControlProduct) - Y2Packager::ProductControlProduct.selected = @product - # offline product from the medium repository - elsif @product.is_a?(Y2Packager::ProductLocation) - # in offline installation add the repository with the selected base product - show_popup = true - base_url = Yast::InstURL.installInf2Url("") - log_url = Yast::URL.HidePassword(base_url) - Yast::Packages.Initialize_StageInitial(show_popup, base_url, log_url, @product.dir) - # select the product to install - Yast::Pkg.ResolvableInstall(@product.details && @product.details.product, :product, "") - # initialize addons and the workflow manager - Yast::AddOnProduct.SetBaseProductURL(base_url) - Yast::WorkflowManager.SetBaseWorkflow(false) - else - # reset both YaST and user selection (when going back or any products - # selected by YaST in the previous steps) - Yast::Pkg.PkgApplReset - Yast::Pkg.PkgReset - @product.select - - # Reselecting existing add-on-products for installation again - Yast::AddOnProduct.selected_installation_products.each do |product| - log.info "Reselecting add-on product #{product} for installation" - Yast::Pkg.ResolvableInstall(product, :product, "") - end - end + @product.select end def validate @@ -113,7 +86,7 @@ # unique widget ID for the product # @return [String] widget ID def item_id(prod) - return prod.dir if prod.is_a?(Y2Packager::ProductLocation) + return prod.dir if prod.respond_to?(:dir) "#{prod.name}-#{prod.version}-#{prod.arch}" end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.21/test/lib/clients/inst_complex_welcome_test.rb new/yast2-installation-4.4.22/test/lib/clients/inst_complex_welcome_test.rb --- old/yast2-installation-4.4.21/test/lib/clients/inst_complex_welcome_test.rb 2021-11-03 16:35:34.000000000 +0100 +++ new/yast2-installation-4.4.22/test/lib/clients/inst_complex_welcome_test.rb 2021-11-15 15:53:19.000000000 +0100 @@ -6,27 +6,48 @@ describe Yast::InstComplexWelcomeClient do textdomain "installation" - let(:product) do + let(:product_spec) do instance_double( - Y2Packager::Product, + Y2Packager::ProductSpec, name: "Product", license_confirmation_required?: license_needed?, license?: license?, license: "license content", - license_confirmed?: license_confirmed? + license_confirmed?: license_confirmed?, + display_name: "SUSE Linux Enteprise Server", + version: "15.3", + arch: "x86_64", + base: true, + order: 1, + to_product: product ) end - let(:other_product) do + + let(:other_product_spec) do + instance_double( + Y2Packager::ProductSpec, + name: "Other Product", + display_name: "SUSE Linux Enterprise Desktop", + version: "15.3", + arch: "x86_64", + base: true, + order: 2 + ) + end + + let(:product) do instance_double( Y2Packager::Product, - name: "Other Product" + name: "Product", + license_confirmation_required?: license_needed?, + license_confirmed?: license_confirmed? ) end let(:license_needed?) { true } let(:license_confirmed?) { false } let(:license?) { true } - let(:products) { [product, other_product] } + let(:product_specs) { [product_spec, other_product_spec] } let(:auto) { false } let(:config_mode) { false } let(:update_mode) { false } @@ -66,9 +87,9 @@ stub_const("Yast::ProductLicense", double.as_null_object) stub_const("Yast::Mode", mode_mock) - 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) + allow(Y2Packager::ProductSpec).to receive(:selected_base).and_return(product_spec) + allow(Y2Packager::ProductSpec).to receive(:base_products).and_return(product_specs) + allow(Y2Packager::ProductSpec).to receive(:forced_base_product).and_return(forced_base_product) allow(Y2Packager::MediumType).to receive(:type).and_return(:standard) end @@ -130,7 +151,7 @@ end context "when there are no products available" do - let(:products) { [] } + let(:product_specs) { [] } it "sets up according to chosen values" do expect(subject).to receive(:setup_final_choice) @@ -157,14 +178,8 @@ subject.main end - it "executes from next step" do - expect(Yast::ProductControl).to receive(:RunFrom) - .with(Yast::ProductControl.CurrentStep + 1, true) - subject.main - end - - it "returns nil" do - expect(subject.main).to be_nil + it "returns :next" do + expect(subject.main).to eq(:next) end end @@ -181,14 +196,8 @@ allow(Yast::Language).to receive(:CheckIncompleteTranslation).and_return(true) end - it "returns nil" do - expect(subject.main).to be_nil - end - - it "executes from next step" do - expect(Yast::ProductControl).to receive(:RunFrom) - .with(Yast::ProductControl.CurrentStep + 1, true) - subject.main + it "returns :next" do + expect(subject.main).to eq(:next) end end @@ -250,21 +259,21 @@ let(:update_mode) { false } context "and more than 1 product is available" do - let(:products) { [product, other_product] } + let(:product_specs) { [product_spec, other_product_spec] } it "runs the complex welcome dialog with the list of available products" do expect(Installation::Dialogs::ComplexWelcome).to receive(:run) - .with(products, anything) + .with(product_specs, anything) subject.main end end context "and only 1 product is available" do - let(:products) { [product] } + let(:product_specs) { [product_spec] } it "runs the complex welcome dialog with the list of available products" do expect(Installation::Dialogs::ComplexWelcome).to receive(:run) - .with(products, anything) + .with(product_specs, anything) subject.main end end @@ -273,12 +282,12 @@ # issue with the wrong selected product during a network installation having multiples # products in a single repository, bsc#1124590 context "and there is a forced base product" do - let(:products) { [product, other_product] } - let(:forced_base_product) { other_product } + let(:product_specs) { [product_spec, other_product_spec] } + let(:forced_base_product) { other_product_spec } it "runs the complex welcome dialog with the selected product" do expect(Installation::Dialogs::ComplexWelcome).to receive(:run) - .with([other_product], anything) + .with([other_product_spec], anything) subject.main end end @@ -288,7 +297,7 @@ let(:update_mode) { true } context "and more than 1 product is availble" do - let(:products) { [product, other_product] } + let(:product_specs) { [product_spec, other_product_spec] } it "runs the complex welcome dialog with no products (no license or product selector)" do expect(Installation::Dialogs::ComplexWelcome).to receive(:run) @@ -298,11 +307,11 @@ end context "and only 1 product is available" do - let(:products) { [product] } + let(:product_specs) { [product_spec] } it "runs the complex welcome dialog with the list of available products" do expect(Installation::Dialogs::ComplexWelcome).to receive(:run) - .with(products, anything) + .with(product_specs, anything) subject.main end end @@ -328,7 +337,7 @@ end context "when license was not confirmed" do - let(:products) { [product] } + let(:product_specs) { [product_spec] } let(:license_confirmed?) { false } context "and confirmation is needed" do @@ -353,7 +362,7 @@ context "when more than 1 product exists (it should be accepted later)" do let(:dialog_results) { [:next, :back] } let(:license_needed?) { true } - let(:products) { [product, other_product] } + let(:product_specs) { [product_spec, other_product_spec] } it "does not report an error" do expect(Yast::Popup).to_not receive(:Error) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.21/test/lib/dialogs/complex_welcome_test.rb new/yast2-installation-4.4.22/test/lib/dialogs/complex_welcome_test.rb --- old/yast2-installation-4.4.21/test/lib/dialogs/complex_welcome_test.rb 2021-11-03 16:35:34.000000000 +0100 +++ new/yast2-installation-4.4.22/test/lib/dialogs/complex_welcome_test.rb 2021-11-15 15:53:19.000000000 +0100 @@ -48,13 +48,12 @@ describe "#content" do let(:license) { instance_double("Y2Packager::ProductLicense") } - # there are 3 different 'product' classes: Y2Packager::Product, Y2Packager::ProductControlProduct, Y2Packager::ProductLocation - let(:sles_product) { instance_double("Y2Packager::Product", label: "SLES", license: license) } - let(:sles_online_product) { instance_double("Y2Packager::ProductControlProduct", label: "SLES", license: license) } - let(:sles_offline_product) { instance_double("Y2Packager::ProductLocation", label: "SLES") } + let(:sles_product) { instance_double("Y2Packager::ProductSpec", label: "SLES", license: license) } + let(:sles_online_product) { instance_double("Y2Packager::ControlProductSpec", label: "SLES", license: license) } + let(:sles_offline_product) { instance_double("Y2Packager::RepoProductSpec", label: "SLES") } let(:sled_product) { instance_double("Y2Packager::Product", label: "SLED", license: license) } - let(:sled_online_product) { instance_double("Y2Packager::ProductControlProduct", label: "SLED", license: license) } - let(:sled_offline_product) { instance_double("Y2Packager::ProductLocation", label: "SLED") } + let(:sled_online_product) { instance_double("Y2Packager::ControlProductSpec", label: "SLED", license: license) } + let(:sled_offline_product) { instance_double("Y2Packager::RepoProductSpec", label: "SLED") } let(:language_widget) { Yast::Term.new(:language_widget) } let(:keyboard_widget) { Yast::Term.new(:keyboard_widget) } let(:license_widget) { Yast::Term.new(:license_widget) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.21/test/lib/widgets/product_selector_test.rb new/yast2-installation-4.4.22/test/lib/widgets/product_selector_test.rb --- old/yast2-installation-4.4.21/test/lib/widgets/product_selector_test.rb 2021-11-03 16:35:34.000000000 +0100 +++ new/yast2-installation-4.4.22/test/lib/widgets/product_selector_test.rb 2021-11-15 15:53:19.000000000 +0100 @@ -2,12 +2,12 @@ require "cwm/rspec" -require "y2packager/product" +require "y2packager/product_spec" require "installation/widgets/product_selector" describe ::Installation::Widgets::ProductSelector do - let(:product1) { Y2Packager::Product.new(name: "test1", display_name: "Test 1", version: "15", arch: "x86_64") } - let(:product2) { Y2Packager::Product.new(name: "test2", display_name: "Test 2", version: "15", arch: "x86_64") } + let(:product1) { Y2Packager::ProductSpec.new(name: "test1", display_name: "Test 1", version: "15", arch: "x86_64") } + let(:product2) { Y2Packager::ProductSpec.new(name: "test2", display_name: "Test 2", version: "15", arch: "x86_64") } subject { described_class.new([product1, product2]) } include_examples "CWM::RadioButtons" @@ -81,48 +81,10 @@ allow(subject).to receive(:value).and_return("test1-15-x86_64") end - it "resets previous package configuration" do - allow(product1).to receive(:select) - expect(Yast::Pkg).to receive(:PkgApplReset) - expect(Yast::Pkg).to receive(:PkgReset) - subject.store - end - it "selects the product to install" do expect(product1).to receive(:select) expect(product2).to_not receive(:select) subject.store end - - it "reselect add-on products for installation" do - allow(product1).to receive(:select) - expect(Yast::Pkg).to receive(:ResolvableInstall) - .with("add-on-product", :product, "") - subject.store - end - - context "offline installation medium" do - let(:offline_product) { Y2Packager::ProductLocation.new("product", "dir") } - let(:url) { "http://example.com" } - - before do - allow(offline_product).to receive(:selected?).and_return(true) - allow(Yast::InstURL).to receive(:installInf2Url).and_return(url) - allow(Yast::Packages).to receive(:Initialize_StageInitial) - allow(Yast::Pkg).to receive(:ResolvableInstall) - allow(Yast::AddOnProduct).to receive(:SetBaseProductURL) - allow(Yast::WorkflowManager).to receive(:SetBaseWorkflow) - end - - it "adds the product repository" do - expect(Yast::Packages).to receive(:Initialize_StageInitial) - .with(true, url, url, "dir") - - product_selector = described_class.new([offline_product]) - allow(product_selector).to receive(:value).and_return("dir") - product_selector.init - product_selector.store - end - end end end