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

SLE12-SP1: initialize bootloader during update if proposed from scratch (bnc#899743) #201

Merged
merged 6 commits into from
Feb 4, 2015
Merged

Conversation

jsrain
Copy link
Member

@jsrain jsrain commented Nov 26, 2014

Don't merge anywhere before SP1 development

@jsrain
Copy link
Member Author

jsrain commented Nov 26, 2014

See also yast/yast-packager#96

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 84aa509 on jsrain:bnc899743 into d1c8cfc on yast:master.

@jreidinger
Copy link
Member

When I think about it, I worry that it will need more serious changes for SP1 as SLE12 code always re-propose configuration, which is now what we want for SP1

@jsrain
Copy link
Member Author

jsrain commented Dec 2, 2014

Why do you think so? The re-proposal happens depending on bootloader type read from the system.

@jsrain
Copy link
Member Author

jsrain commented Feb 4, 2015

Again checked the code, proposal client states:
if Mode.update
if ["grub2", "grub2-efi"].include? old_bootloader
Builtins.y2milestone "update of grub2, do not repropose"
if !BootCommon.was_read || @force_reset
# blRead(reread, avoid_reading_device_map)
Bootloader.blRead(true, true)
BootCommon.was_read = true
end
else
if !BootCommon.was_proposed || @force_reset
# Repropose the type. A regular Reset/Propose is not enough.
# For more details see bnc#872081
BootCommon.setLoaderType(nil)
Bootloader.Reset
Bootloader.Propose
end
end
else
# in installation always propose missing stuff
Bootloader.Propose
end
This means that we should be set even for SP1 - if old bootloader is GRUB2, it will be updated, otherwise configuration proposed from scratch.
Please, tell me if you have further comments, otherwise I will make it merge-able.

@jreidinger
Copy link
Member

I think we need at least add "none" bootloader, as for it we do not want to overwrite user configuration if he really do not want to automanage dependencies. Otherwise it should work.

@jsrain
Copy link
Member Author

jsrain commented Feb 4, 2015

Good point :-)

@jreidinger
Copy link
Member

otherwise it looks good.

@jreidinger
Copy link
Member

Looks good, just please also update brand new testsuite to cover this new "none" case https://github.com/yast/yast-bootloader/blob/master/test/bootloader_proposal_client_test.rb#L144

@coveralls
Copy link

Coverage Status

Coverage remained the same at 58.9% when pulling 718246d on jsrain:bnc899743 into 9e52242 on yast:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 58.88% when pulling 718246d on jsrain:bnc899743 into 9e52242 on yast:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 58.97% when pulling a3d5c6d on jsrain:bnc899743 into 9e52242 on yast:master.

@jreidinger
Copy link
Member

good code coverage increased. Just last fail in travis from rubocop:

14.98s$ rubocop

warning: parser/current is loading parser/ruby21, which recognizes

warning: 2.1.5-compliant syntax, but you are running 2.1.2.

Inspecting 66 files

....................................C.............................

Offenses:

src/clients/inst_bootloader.rb:35:31: C: Do not leave space between ! and its argument.

if Mode.installation || ! BootCommon.was_read

@jreidinger
Copy link
Member

you are quick. LGTM if travis passed

@jsrain
Copy link
Member Author

jsrain commented Feb 4, 2015

Just wanted to write that I was faster :-)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 58.97% when pulling 87952b5 on jsrain:bnc899743 into 9e52242 on yast:master.

jsrain added a commit that referenced this pull request Feb 4, 2015
SLE12-SP1: initialize bootloader during update if proposed from scratch (bnc#899743)
@jsrain jsrain merged commit 821a1f5 into yast:master Feb 4, 2015
@jsrain jsrain deleted the bnc899743 branch February 5, 2015 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants