-
Notifications
You must be signed in to change notification settings - Fork 69
Add Progress to bootloader install #7
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
Conversation
|
|
||
| private | ||
|
|
||
| def report(title, step, substeps: 0, current_substep: 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not making it public and use it directly in the installer.rb?
I mean,
...
def install
...
Yast::Installation.destdir = "/mnt"
# Imaging we have a collection of steps or so where partitioning could be...
#
# class Partitioning < InstallationStep
# def start_label
# _("Partitioning target disk")
# end
#
# def perform
# Yast::WFM.CallFunction("inst_prepdisk", [])
# end
#
# ...
steps = [partitioning, package_installation, bootloader_installation]
# So...
progress = InstallationProgress.new(@dbus_obj, steps.size, logger: logger)
steps.each_with_index |step, index| do
progress.report(step.start_label, index)
step.perform
progress.report(step.end_label, index + 1)
end
...
end
...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, I am still not sure whose responsibility it is. Also progress needs to know about number of steps so it can report it. So question is who owns responsibility for proper messaging. Still not sure what would be the best solution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also progress needs to know about number of steps so it can report it
Right. That's why I put the "steps.size" in the InstallationProgress constructor. To tell it the number of steps when creating it, instead of having an internal constant that must be in sync with the installer.rb.
Anyway, let's continue playing around. Thank you!
Changes on top of latest LVM features
No description provided.