From cbade25906489373c41d39784c363a3a094f3a67 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 3 Jan 2022 14:45:13 +0100 Subject: [PATCH 01/25] change installation progress class --- yastd/lib/yast2/dbus/installer.rb | 2 + .../{progress.rb => installation_progress.rb} | 55 +++++++++++++++++-- yastd/lib/yast2/installer.rb | 33 ++++++----- 3 files changed, 71 insertions(+), 19 deletions(-) rename yastd/lib/yast2/{progress.rb => installation_progress.rb} (52%) diff --git a/yastd/lib/yast2/dbus/installer.rb b/yastd/lib/yast2/dbus/installer.rb index 4b72c369fc..c71991e737 100644 --- a/yastd/lib/yast2/dbus/installer.rb +++ b/yastd/lib/yast2/dbus/installer.rb @@ -42,6 +42,8 @@ def initialize(installer, logger, *args) self.StatusChanged(status.id) end + installer.dbus_obj = self + super(*args) end diff --git a/yastd/lib/yast2/progress.rb b/yastd/lib/yast2/installation_progress.rb similarity index 52% rename from yastd/lib/yast2/progress.rb rename to yastd/lib/yast2/installation_progress.rb index 9a236a07c0..edbd22bdad 100644 --- a/yastd/lib/yast2/progress.rb +++ b/yastd/lib/yast2/installation_progress.rb @@ -22,23 +22,70 @@ # YaST specific code lives under this namespace module Yast2 # This class represents the installer status - class Progress - def initialize(dbus_obj) + class InstallProgress + KNOWN_STEPS = 3 # keep it in sync with installer.rb + def initialize(dbus_obj, logger: nil) @dbus_obj = dbus_obj + @logger = logger @total_pkgs = 0 @remaining_pkgs = 0 end + def partitioning(&block) + report( + # TODO: localization + "Partitioning target disk", 0 + ) + block.call(self) + report( + # TODO: localization + "Partitioning finished", 1 + ) + end + + def package_installation(&block) + report( + # TODO: localization + "Starting to install packages", 1 + ) + block.call(self) + report( + # TODO: localization + "Package installation finished", 2 + ) + end + + def bootloader_installation(&block) + report( + # TODO: localization + "Starting to deploy bootloader", 2 + ) + block.call(self) + report( + # TODO: localization + "Installation finished", 3 + ) + end + def packages_to_install=(value) @total_pkgs = @remaining_pkgs = value end def package_installed @remaining_pkgs -= 1 - @dbus_obj&.report_progress( + report( # TODO: localization "Installing packages (#{@remaining_pkgs} remains)", - 1, 0, @total_pkgs, @total_pkgs - @remaining_pkgs + 1, substeps: @total_pkgs, current_substep: @total_pkgs - @remaining_pkgs + ) + end + + private + + def report(title, step, substeps: 0, current_substep: 0) + @logger&.info title + @dbus_obj&.report_progress( + title, KNOWN_STEPS, step, substeps, current_substep ) end end diff --git a/yastd/lib/yast2/installer.rb b/yastd/lib/yast2/installer.rb index e84d591071..a42c034dcb 100644 --- a/yastd/lib/yast2/installer.rb +++ b/yastd/lib/yast2/installer.rb @@ -4,7 +4,7 @@ require "y2storage" require "yast2/installer_status" require "yast2/software" -require "yast2/progress" +require "yast2/installation_progress" require "bootloader/proposal_client" require "bootloader/finish_client" require "dbus" @@ -63,7 +63,6 @@ def initialize(logger: nil) @status = InstallerStatus::IDLE @logger = logger || Logger.new(STDOUT) @software = Software.new(@logger) - @progress = Progress.new(nil) # TODO: fix passing progress # Set stage to initial, so it will act as installer for some cases like # proposing installer instead of reading current one Yast::Stage.Set("initial") @@ -120,20 +119,20 @@ def storage_proposal end def install - Yast::Installation.destdir = "/mnt" - logger.info "Installing(partitioning)" - change_status(InstallerStatus::PARTITIONING) - Yast::WFM.CallFunction("inst_prepdisk", []) - # Install software - logger.info "Installing(installing software)" change_status(InstallerStatus::INSTALLING) - @software.install(@progress) - # Install bootloader - logger.info "Installing(bootloader)" - proposal = ::Bootloader::ProposalClient.new.make_proposal({}) - logger.info "Bootloader proposal #{proposal.inspect}" - ::Bootloader::FinishClient.new.write - logger.info "Installing(finished)" + progress = InstallationProgress.new(@dbus_obj, logger: logger) + Yast::Installation.destdir = "/mnt" + progress.partitioning do |_| + Yast::WFM.CallFunction("inst_prepdisk", []) + end + progress.package_installation do |progr| + @software.install(progr) + end + progress.bootloader_installation do |_| + proposal = ::Bootloader::ProposalClient.new.make_proposal({}) + logger.info "Bootloader proposal #{proposal.inspect}" + ::Bootloader::FinishClient.new.write + end change_status(InstallerStatus::IDLE) end @@ -146,6 +145,10 @@ def on_status_change(&block) @on_status_change = block end + def dbus_obj=(obj) + @dbus_obj = obj + end + private def change_status(new_status) From 2cee067802bac70755b60e00b073922a0a3897f2 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 3 Jan 2022 15:07:19 +0100 Subject: [PATCH 02/25] fix name --- yastd/lib/yast2/installation_progress.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yastd/lib/yast2/installation_progress.rb b/yastd/lib/yast2/installation_progress.rb index edbd22bdad..87223d8887 100644 --- a/yastd/lib/yast2/installation_progress.rb +++ b/yastd/lib/yast2/installation_progress.rb @@ -22,7 +22,7 @@ # YaST specific code lives under this namespace module Yast2 # This class represents the installer status - class InstallProgress + class InstallationProgress KNOWN_STEPS = 3 # keep it in sync with installer.rb def initialize(dbus_obj, logger: nil) @dbus_obj = dbus_obj From f307e0134d5ed6eef5ac68007fd3fbfdcf3980f9 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 3 Jan 2022 15:09:21 +0100 Subject: [PATCH 03/25] fix method name --- yastd/lib/yast2/installation_progress.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yastd/lib/yast2/installation_progress.rb b/yastd/lib/yast2/installation_progress.rb index 87223d8887..d92559665c 100644 --- a/yastd/lib/yast2/installation_progress.rb +++ b/yastd/lib/yast2/installation_progress.rb @@ -84,7 +84,7 @@ def package_installed def report(title, step, substeps: 0, current_substep: 0) @logger&.info title - @dbus_obj&.report_progress( + @dbus_obj&.Progress( title, KNOWN_STEPS, step, substeps, current_substep ) end From d03e6f1c6422b5c4323bc9ba398b206982058f98 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 3 Jan 2022 15:11:20 +0100 Subject: [PATCH 04/25] try to fix signature --- yastd/lib/yast2/dbus/installer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yastd/lib/yast2/dbus/installer.rb b/yastd/lib/yast2/dbus/installer.rb index c71991e737..209ea66a5d 100644 --- a/yastd/lib/yast2/dbus/installer.rb +++ b/yastd/lib/yast2/dbus/installer.rb @@ -172,7 +172,7 @@ def initialize(installer, logger, *args) # - total_substeps: total count of smaller steps done as part of big step. Can be 0, which means no substeps defined # - current_substep: current substep. Always in range of 0..total_substeps dbus_signal :Progress, - "message:s, total_steps:t, current_step: t, total_substeps: t, current_substep: t" + "message:s, total_steps:t, current_step:t, total_substeps:t, current_substep:t" end end end From 53b6e1f592998c64534b1332185bb344cd6e31ad Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 3 Jan 2022 15:33:14 +0100 Subject: [PATCH 05/25] try to fix bootloader installation --- yastd/lib/yast2/installer.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/yastd/lib/yast2/installer.rb b/yastd/lib/yast2/installer.rb index a42c034dcb..1a23ed7055 100644 --- a/yastd/lib/yast2/installer.rb +++ b/yastd/lib/yast2/installer.rb @@ -86,6 +86,9 @@ def probe change_status(InstallerStatus::PROBING) probe_languages @software.probe + # first make bootloader proposal to be sure that required packages is installed + proposal = ::Bootloader::ProposalClient.new.make_proposal({}) + logger.info "Bootloader proposal #{proposal.inspect}" @software.propose probe_storage true @@ -126,11 +129,12 @@ def install Yast::WFM.CallFunction("inst_prepdisk", []) end progress.package_installation do |progr| + # call inst bootloader to get properly initialized bootloader + # sysconfig before package installation + Yast::WFM.CallFunction("inst_bootloader", []) @software.install(progr) end progress.bootloader_installation do |_| - proposal = ::Bootloader::ProposalClient.new.make_proposal({}) - logger.info "Bootloader proposal #{proposal.inspect}" ::Bootloader::FinishClient.new.write end change_status(InstallerStatus::IDLE) From e6666232dd81266017b22847008910c8810c16ba Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 3 Jan 2022 15:35:10 +0100 Subject: [PATCH 06/25] reorder properly probing and proposals --- yastd/lib/yast2/installer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yastd/lib/yast2/installer.rb b/yastd/lib/yast2/installer.rb index 1a23ed7055..aea9351cd0 100644 --- a/yastd/lib/yast2/installer.rb +++ b/yastd/lib/yast2/installer.rb @@ -85,12 +85,12 @@ def options def probe change_status(InstallerStatus::PROBING) probe_languages + probe_storage @software.probe # first make bootloader proposal to be sure that required packages is installed proposal = ::Bootloader::ProposalClient.new.make_proposal({}) logger.info "Bootloader proposal #{proposal.inspect}" @software.propose - probe_storage true rescue StandardError => e logger.error "Probing error: #{e.inspect}" From b3ff6e2bb551571da9d7b148997e3f577919f4cc Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 3 Jan 2022 16:44:06 +0100 Subject: [PATCH 07/25] try to fix software proposal --- yastd/lib/yast2/installer.rb | 11 +++++++---- yastd/lib/yast2/software.rb | 7 ++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/yastd/lib/yast2/installer.rb b/yastd/lib/yast2/installer.rb index aea9351cd0..cdf9a9f2cf 100644 --- a/yastd/lib/yast2/installer.rb +++ b/yastd/lib/yast2/installer.rb @@ -87,10 +87,6 @@ def probe probe_languages probe_storage @software.probe - # first make bootloader proposal to be sure that required packages is installed - proposal = ::Bootloader::ProposalClient.new.make_proposal({}) - logger.info "Bootloader proposal #{proposal.inspect}" - @software.propose true rescue StandardError => e logger.error "Probing error: #{e.inspect}" @@ -123,6 +119,13 @@ def storage_proposal def install change_status(InstallerStatus::INSTALLING) + # lets propose it here to be sure that software proposal reflects product selection + # FIXME: maybe repropose after product selection change? + # first make bootloader proposal to be sure that required packages is installed + proposal = ::Bootloader::ProposalClient.new.make_proposal({}) + logger.info "Bootloader proposal #{proposal.inspect}" + @software.propose + progress = InstallationProgress.new(@dbus_obj, logger: logger) Yast::Installation.destdir = "/mnt" progress.partitioning do |_| diff --git a/yastd/lib/yast2/software.rb b/yastd/lib/yast2/software.rb index caa4efbead..cbc0d54243 100644 --- a/yastd/lib/yast2/software.rb +++ b/yastd/lib/yast2/software.rb @@ -51,12 +51,13 @@ def probe Yast::Pkg.SourceRestore Yast::Pkg.SourceLoad @products = Y2Packager::Product.all - end - - def propose @product = @products.first&.name raise "No Product Available" unless @product + end + + def propose + @products.find { |p| p.name == @product }.select Yast::Packages.Proposal(force_reset = true, reinit = true, _simple = true) # do not return proposal hash, so intentional nil here From ad3fc52e421761665431205b5451f6dd88a6d1a7 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 3 Jan 2022 17:13:05 +0100 Subject: [PATCH 08/25] log software proposal --- yastd/lib/yast2/software.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yastd/lib/yast2/software.rb b/yastd/lib/yast2/software.rb index cbc0d54243..ab615b3bbc 100644 --- a/yastd/lib/yast2/software.rb +++ b/yastd/lib/yast2/software.rb @@ -59,7 +59,8 @@ def probe def propose @products.find { |p| p.name == @product }.select - Yast::Packages.Proposal(force_reset = true, reinit = true, _simple = true) + proposal = Yast::Packages.Proposal(force_reset = true, reinit = true, _simple = true) + @logger.info "proposal #{proposal["raw_proposal"]}" # do not return proposal hash, so intentional nil here nil end From bed27ec9d60fd07a44af584374b1437baf8630f8 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 3 Jan 2022 17:13:55 +0100 Subject: [PATCH 09/25] do not reset product selection --- yastd/lib/yast2/software.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yastd/lib/yast2/software.rb b/yastd/lib/yast2/software.rb index ab615b3bbc..2ebf30d6fb 100644 --- a/yastd/lib/yast2/software.rb +++ b/yastd/lib/yast2/software.rb @@ -59,7 +59,7 @@ def probe def propose @products.find { |p| p.name == @product }.select - proposal = Yast::Packages.Proposal(force_reset = true, reinit = true, _simple = true) + proposal = Yast::Packages.Proposal(force_reset = true, reinit = false, _simple = true) @logger.info "proposal #{proposal["raw_proposal"]}" # do not return proposal hash, so intentional nil here nil From 0321c1c96436899daaa0df6ae72ac7459ba39938 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 3 Jan 2022 17:20:37 +0100 Subject: [PATCH 10/25] more playing with software --- yastd/lib/yast2/software.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yastd/lib/yast2/software.rb b/yastd/lib/yast2/software.rb index 2ebf30d6fb..0a5b5b6290 100644 --- a/yastd/lib/yast2/software.rb +++ b/yastd/lib/yast2/software.rb @@ -52,6 +52,8 @@ def probe Yast::Pkg.SourceLoad @products = Y2Packager::Product.all @product = @products.first&.name + proposal = Yast::Packages.Proposal(force_reset = true, reinit = false, _simple = true) + @logger.info "proposal #{proposal["raw_proposal"]}" raise "No Product Available" unless @product end From 6006a1ca02657fa873d2cb28c1beb03472b69916 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 3 Jan 2022 17:35:03 +0100 Subject: [PATCH 11/25] more playing with software --- yastd/lib/yast2/software.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/yastd/lib/yast2/software.rb b/yastd/lib/yast2/software.rb index 0a5b5b6290..c3923235be 100644 --- a/yastd/lib/yast2/software.rb +++ b/yastd/lib/yast2/software.rb @@ -25,6 +25,7 @@ Yast.import "Pkg" Yast.import "PackageInstallation" +Yast.import "Stage" # YaST specific code lives under this namespace module Yast2 @@ -46,6 +47,8 @@ def select_product(name) def probe logger.info "Probing software" + # as we use liveDVD with normal like ENV, lets temporary switch to normal to use its repos + Yast::Stage.Set("normal") Yast::Pkg.TargetInitialize("/") Yast::Pkg.TargetLoad Yast::Pkg.SourceRestore @@ -54,6 +57,7 @@ def probe @product = @products.first&.name proposal = Yast::Packages.Proposal(force_reset = true, reinit = false, _simple = true) @logger.info "proposal #{proposal["raw_proposal"]}" + Yast::Stage.Set("initial") raise "No Product Available" unless @product end @@ -61,8 +65,11 @@ def probe def propose @products.find { |p| p.name == @product }.select + # as we use liveDVD with normal like ENV, lets temporary switch to normal to use its repos + Yast::Stage.Set("normal") proposal = Yast::Packages.Proposal(force_reset = true, reinit = false, _simple = true) @logger.info "proposal #{proposal["raw_proposal"]}" + Yast::Stage.Set("initial") # do not return proposal hash, so intentional nil here nil end From fdc66d8d987466d470b7da3d71dda958ebb69108 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Tue, 4 Jan 2022 11:12:01 +0100 Subject: [PATCH 12/25] more tweaking of software --- yastd/lib/yast2/software.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/yastd/lib/yast2/software.rb b/yastd/lib/yast2/software.rb index c3923235be..1fa3abdd64 100644 --- a/yastd/lib/yast2/software.rb +++ b/yastd/lib/yast2/software.rb @@ -63,11 +63,13 @@ def probe end def propose - @products.find { |p| p.name == @product }.select + selected_product = @products.find { |p| p.name == @product } + selected_product.select + @logger.info "selected product #{selected_product.inspect}" # as we use liveDVD with normal like ENV, lets temporary switch to normal to use its repos Yast::Stage.Set("normal") - proposal = Yast::Packages.Proposal(force_reset = true, reinit = false, _simple = true) + proposal = Yast::Packages.Proposal(force_reset = false, reinit = false, _simple = true) @logger.info "proposal #{proposal["raw_proposal"]}" Yast::Stage.Set("initial") # do not return proposal hash, so intentional nil here From 289a84447de1416219f91972035b8d1a05a7b5d1 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Tue, 4 Jan 2022 14:58:55 +0100 Subject: [PATCH 13/25] try additional solve --- yastd/lib/yast2/software.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yastd/lib/yast2/software.rb b/yastd/lib/yast2/software.rb index 1fa3abdd64..a5f7cf7ec8 100644 --- a/yastd/lib/yast2/software.rb +++ b/yastd/lib/yast2/software.rb @@ -71,6 +71,9 @@ def propose Yast::Stage.Set("normal") proposal = Yast::Packages.Proposal(force_reset = false, reinit = false, _simple = true) @logger.info "proposal #{proposal["raw_proposal"]}" + res = Yast::Pkg.PkgSolve(unused = true) + @logger.info "solver run #{res.inspect}" + Yast::Stage.Set("initial") # do not return proposal hash, so intentional nil here nil From c90ce640f3917cfee0573d35149527326704a659 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Tue, 4 Jan 2022 15:27:42 +0100 Subject: [PATCH 14/25] force more patterns --- yastd/lib/yast2/software.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yastd/lib/yast2/software.rb b/yastd/lib/yast2/software.rb index a5f7cf7ec8..33fd3eeff6 100644 --- a/yastd/lib/yast2/software.rb +++ b/yastd/lib/yast2/software.rb @@ -69,6 +69,8 @@ def propose # as we use liveDVD with normal like ENV, lets temporary switch to normal to use its repos Yast::Stage.Set("normal") + # FIXME: workaround to have at least reasonable proposal + Yast::PackagesProposal.AddResolvables("the-installer", :pattern, ["base", "enhanced_base"]) proposal = Yast::Packages.Proposal(force_reset = false, reinit = false, _simple = true) @logger.info "proposal #{proposal["raw_proposal"]}" res = Yast::Pkg.PkgSolve(unused = true) From c1f371b646d1b270b1e8119d9f7bf2051a77f348 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Tue, 4 Jan 2022 15:40:53 +0100 Subject: [PATCH 15/25] more debugging --- yastd/lib/yast2/software.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yastd/lib/yast2/software.rb b/yastd/lib/yast2/software.rb index 33fd3eeff6..b7193c0f63 100644 --- a/yastd/lib/yast2/software.rb +++ b/yastd/lib/yast2/software.rb @@ -94,6 +94,8 @@ def install(progress) log.error("Commit failed") raise Yast::Pkg.LastError end + + @logger.info "Commit result #{commit_result}" end private From 0b49dc8216be2e31ff494f75b0ba2689b8853dda Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Tue, 4 Jan 2022 16:47:26 +0100 Subject: [PATCH 16/25] try to init target earlier --- yastd/lib/yast2/software.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yastd/lib/yast2/software.rb b/yastd/lib/yast2/software.rb index b7193c0f63..f6fa646d83 100644 --- a/yastd/lib/yast2/software.rb +++ b/yastd/lib/yast2/software.rb @@ -63,6 +63,7 @@ def probe end def propose + Yast::Pkg.TargetInitialize(Yast::Installation.destdir) selected_product = @products.find { |p| p.name == @product } selected_product.select @logger.info "selected product #{selected_product.inspect}" @@ -87,7 +88,6 @@ def install(progress) PackageCallbacks.setup(progress) # TODO: error handling - Yast::Pkg.TargetInitialize(Yast::Installation.destdir) commit_result = Yast::PackageInstallation.Commit({}) if commit_result.nil? || commit_result.empty? From 69a0c3526e7748d1f70e5c89787708f6d52d47b8 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Tue, 4 Jan 2022 17:05:04 +0100 Subject: [PATCH 17/25] move change of destdir --- yastd/lib/yast2/installer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yastd/lib/yast2/installer.rb b/yastd/lib/yast2/installer.rb index cdf9a9f2cf..137e99fcce 100644 --- a/yastd/lib/yast2/installer.rb +++ b/yastd/lib/yast2/installer.rb @@ -119,6 +119,7 @@ def storage_proposal def install change_status(InstallerStatus::INSTALLING) + Yast::Installation.destdir = "/mnt" # lets propose it here to be sure that software proposal reflects product selection # FIXME: maybe repropose after product selection change? # first make bootloader proposal to be sure that required packages is installed @@ -127,7 +128,6 @@ def install @software.propose progress = InstallationProgress.new(@dbus_obj, logger: logger) - Yast::Installation.destdir = "/mnt" progress.partitioning do |_| Yast::WFM.CallFunction("inst_prepdisk", []) end From a5b71fc04f36165eb1590a3fe15ca7a7b6927c2a Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Wed, 5 Jan 2022 11:03:30 +0100 Subject: [PATCH 18/25] fix typo --- yastd/lib/yast2/software.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yastd/lib/yast2/software.rb b/yastd/lib/yast2/software.rb index f6fa646d83..6f53719aac 100644 --- a/yastd/lib/yast2/software.rb +++ b/yastd/lib/yast2/software.rb @@ -91,7 +91,7 @@ def install(progress) commit_result = Yast::PackageInstallation.Commit({}) if commit_result.nil? || commit_result.empty? - log.error("Commit failed") + @logger.error("Commit failed") raise Yast::Pkg.LastError end From b633d64ab671117d56ba2a36bca42785531dd0b6 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Wed, 5 Jan 2022 14:57:39 +0100 Subject: [PATCH 19/25] load also modified target --- yastd/lib/yast2/software.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/yastd/lib/yast2/software.rb b/yastd/lib/yast2/software.rb index 6f53719aac..a7dcee9866 100644 --- a/yastd/lib/yast2/software.rb +++ b/yastd/lib/yast2/software.rb @@ -64,6 +64,7 @@ def probe def propose Yast::Pkg.TargetInitialize(Yast::Installation.destdir) + Yast::Pkg.TargetLoad selected_product = @products.find { |p| p.name == @product } selected_product.select @logger.info "selected product #{selected_product.inspect}" From a1e53fc48eca144e7b24d8e0fb92d9af669fcc85 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 10 Jan 2022 09:53:06 +0100 Subject: [PATCH 20/25] add augeas-devel dependency --- README.md | 2 +- deploy.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 94c4f18526..d288a6b0d9 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ TODO: use a url shortener To build and run this software you need a few tools. To install them on openSUSE Tumbleweed just type: - $ sudo zypper in gcc gcc-c++ make openssl-devel ruby-devel npm + $ sudo zypper in gcc gcc-c++ make openssl-devel ruby-devel augeas-devel npm ## yastd diff --git a/deploy.sh b/deploy.sh index 9336d64b2e..e252fe2ae4 100644 --- a/deploy.sh +++ b/deploy.sh @@ -1,5 +1,5 @@ #! /bin/sh -sudo zypper --non-interactive install gcc gcc-c++ make openssl-devel ruby-devel npm git || exit 1 +sudo zypper --non-interactive install gcc gcc-c++ make openssl-devel ruby-devel npm git augeas-devel || exit 1 git clone https://github.com/yast/the-installer || exit 1 cd the-installer From aa69713df3bd0ed836cfafb937d55e6a1ef9e51e Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 10 Jan 2022 10:04:47 +0100 Subject: [PATCH 21/25] add rexml as dep due to ruby3 --- yastd/Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/yastd/Gemfile b/yastd/Gemfile index 8d89064797..22e787a487 100644 --- a/yastd/Gemfile +++ b/yastd/Gemfile @@ -4,6 +4,7 @@ source "https://rubygems.org" gem "rake" gem "ruby-dbus" +gem "rexml" # dependency of dbus gem "eventmachine" gem "nokogiri" From 20d9d8b83eed25c6c7b4f2a0096ccbab675d7322 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 10 Jan 2022 10:59:24 +0100 Subject: [PATCH 22/25] have nokogiri just once --- yastd/Gemfile | 1 - 1 file changed, 1 deletion(-) diff --git a/yastd/Gemfile b/yastd/Gemfile index 22e787a487..a5c4be7529 100644 --- a/yastd/Gemfile +++ b/yastd/Gemfile @@ -6,7 +6,6 @@ gem "rake" gem "ruby-dbus" gem "rexml" # dependency of dbus gem "eventmachine" -gem "nokogiri" # Required by YaST gem "cheetah" From f9a5f9ab577aa72f39024637ef11c3d0dbf7e62e Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 10 Jan 2022 11:01:02 +0100 Subject: [PATCH 23/25] one more rexml gem --- yastd-proxy/Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/yastd-proxy/Gemfile b/yastd-proxy/Gemfile index f2b2fb6552..af34c30685 100644 --- a/yastd-proxy/Gemfile +++ b/yastd-proxy/Gemfile @@ -10,3 +10,4 @@ gem "sinatra" gem "sinatra-cors" gem "ruby-dbus", require: "dbus" gem "thin" +gem "rexml" # ruby3 has it as separate gem From 5398e3b7a81c7bb0b4a8fe6e162c5d7e88d26170 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 10 Jan 2022 11:21:36 +0100 Subject: [PATCH 24/25] change scr for bootloader --- yastd/lib/yast2/installer.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/yastd/lib/yast2/installer.rb b/yastd/lib/yast2/installer.rb index 137e99fcce..39d6fd2ee0 100644 --- a/yastd/lib/yast2/installer.rb +++ b/yastd/lib/yast2/installer.rb @@ -138,6 +138,7 @@ def install @software.install(progr) end progress.bootloader_installation do |_| + Yast::WFM.SCROpen("chroot=#{Yast::Installation.destdir}:scr"), false) ::Bootloader::FinishClient.new.write end change_status(InstallerStatus::IDLE) From 7a2a23b150f38e76aca422732016329afc620b5f Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 10 Jan 2022 11:49:54 +0100 Subject: [PATCH 25/25] fix typo --- yastd/lib/yast2/installer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yastd/lib/yast2/installer.rb b/yastd/lib/yast2/installer.rb index 39d6fd2ee0..3e1e8a8e5c 100644 --- a/yastd/lib/yast2/installer.rb +++ b/yastd/lib/yast2/installer.rb @@ -138,7 +138,7 @@ def install @software.install(progr) end progress.bootloader_installation do |_| - Yast::WFM.SCROpen("chroot=#{Yast::Installation.destdir}:scr"), false) + Yast::WFM.SCROpen("chroot=#{Yast::Installation.destdir}:scr", false) ::Bootloader::FinishClient.new.write end change_status(InstallerStatus::IDLE)