Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install also bootloader #5

Merged
merged 1 commit into from
Dec 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions yastd/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ gem "nokogiri"
gem "cheetah"
gem "fast_gettext"
gem "nokogiri"
gem "cfa"
gem "cfa_grub2"
13 changes: 12 additions & 1 deletion yastd/lib/yast2/installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
require "yast2/installer_status"
require "yast2/software"
require "yast2/progress"
require "bootloader/proposal_client"
require "bootloader/finish_client"
require "dbus"
require "forwardable"

Yast.import "Stage"

# YaST specific code lives under this namespace
module Yast2
# This class represents the installer itself
Expand Down Expand Up @@ -60,6 +64,9 @@ def initialize(logger: nil)
@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")
end

def options
Expand Down Expand Up @@ -117,11 +124,15 @@ def install
logger.info "Installing(partitioning)"
change_status(InstallerStatus::PARTITIONING)
Yast::WFM.CallFunction("inst_prepdisk", [])
sleep 5
# 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)"
change_status(InstallerStatus::IDLE)
end
Expand Down