-
Notifications
You must be signed in to change notification settings - Fork 24
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
[blog] Drop usage of perl-Bootloader #280
Conversation
@@ -110,6 +109,10 @@ def Propose | |||
end | |||
end | |||
|
|||
propose_os_probing | |||
propose_terminal | |||
propose_timout |
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.
Just a typo here (propose_timeout
).
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.
thanks for catch. I really indicate need of tests :)
In general, looks good. Anyway, I miss some documentation to make this pre-review process easier :) |
travis failed due to not yet published config_files gem. |
Just one note about a removed comment. Other than that, LGTM. |
…hould replace switcher
|
||
module Bootloader | ||
# Represents non-EFI variant of GRUB2 | ||
class Grub2 < GRUB2Base |
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.
This is inconsistent. We should use only one of Grub
, GRUB
in class names.
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.
I know, currently it is WIP. I plan to rename GRUB2Base to Grub2Base
raise "cannot have secure boot without efi" if secure_boot && !efi | ||
end | ||
|
||
def execute(devices: nil) |
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.
@param [Array,nil] devices identified by eg. "/dev/hda7", "/dev/ttyS0", "(hd8)", "/dev/by-zodiac/sagittarius" ?
add import functionality
Jreidinger config files proto
Jreidinger config files proto
…eady written into /etc/default/grub
fix writting btrfs on btrfs as grub2-install need some data to be alr…
merge master back to topic branch
JFYI final code climate rating change 3.3 GPA(+1.57) https://codeclimate.com/github/yast/yast-bootloader/compare/config_files_proto |
@@ -4,4 +4,7 @@ Yast::Tasks.configuration do |conf| | |||
# lets ignore license check for now | |||
conf.skip_license_check << /.*/ | |||
conf.install_locations["doc/autodocs"] = conf.install_doc_dir | |||
|
|||
conf.obs_project = "home:cwh:branches:YaST:Head" |
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.
NTH: This is just a temporary OBS project isn't it? Then if would be nice to have a FIXME
comment there...
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.
ah, good catch, it should be removed from master, thanks for noticing it
LGTM (after a quick scan of the big and incomplete diff) |
thanks |
Bootloader
There is plan to stop using perl-Bootloader as library for
yast2-Bootloader and now we realize it. Reasons for change were
different. The most visible user reason, is size of minimal system.
Grub2 for update of bootloader need just simple call of grub2-mkconfig,
but currently it uses whole perl-library with all its dependencies. It
also do whole hardware probing, which is later done by grub2-mkconfig
itself. So this change allow to simplify perl-Bootloader to be smaller
and make kernel update post script faster.
For developers main reason is to unify developed languages and also
reuse existing solution for file reading and parsing. For that reason
now yast2-bootloader uses rubygem cfa_grub2 which heavily depends on
augeas file parser/serializer. It allows to have code smaller and
simplifier. User visible change when using augeas is smarter editing
and keeping more comments. It is especially visible in installation,
when currently bootloader after installation of default grub2
configuration edit this file instead of overwritting with own version
like it was done in past.
Side-effect of this change is removal lot of work-arounds and simplify
installation work-flow for bootloader allowing easier future
improvement and open door for speed up a bit bootloader installation.
Also this change is taken as oppurtinity to improve code quality. To
ensure we do not break current work-flow we also improve test coverage
for bootloader module.
So some numbers showing effect of this change:
change size:
test coverage:
code climate rating: