Skip to content

Commit

Permalink
Merge pull request #163 from yast/fix_autoupgrade_proposal
Browse files Browse the repository at this point in the history
Fix autoupgrade proposal
  • Loading branch information
jreidinger committed Sep 18, 2014
2 parents 287e283 + 6f5641c commit 1b30549
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
7 changes: 7 additions & 0 deletions package/yast2-bootloader.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Sep 18 15:24:43 UTC 2014 - jreidinger@suse.com

- propose missing attributes also during automatic upgrade which
propose grub2 configuratin (bnc#897058)
- 3.1.94.3

-------------------------------------------------------------------
Wed Sep 17 07:42:12 UTC 2014 - jreidinger@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-bootloader.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-bootloader
Version: 3.1.94.2
Version: 3.1.94.3
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
4 changes: 2 additions & 2 deletions src/clients/bootloader_proposal.rb
Expand Up @@ -38,7 +38,7 @@ def main
@force_reset = Ops.get_boolean(@param, "force_reset", false)
@language_changed = Ops.get_boolean(@param, "language_changed", false)

if @force_reset && !Mode.autoinst
if @force_reset && !Mode.autoinst && !Mode.autoupgrade
# force re-calculation of bootloader proposal
# this deletes any internally cached values, a new proposal will
# not be partially based on old data now any more
Expand All @@ -49,7 +49,7 @@ def main
end

# proposal not changed by user so repropose it from scratch
if !Bootloader.proposed_cfg_changed && !Mode.autoinst
if !Bootloader.proposed_cfg_changed && !Mode.autoinst && !Mode.autoupgrade
Builtins.y2milestone "Proposal not modified, so repropose from scratch"
Bootloader.ResetEx(false)
end
Expand Down
4 changes: 2 additions & 2 deletions src/include/bootloader/grub2/misc.rb
Expand Up @@ -1050,15 +1050,15 @@ def grub_LocationProposal
BootCommon.cached_settings_base_data_change_time !=
Storage.GetTargetChangeTime &&
# bnc#585824 - Bootloader doesn't use defined device map from autoyast
!(Mode.autoinst &&
!((Mode.autoinst || Mode.autoupgrade) &&
BootCommon.cached_settings_base_data_change_time == nil)
BootStorage.ProposeDeviceMap
md_mbr = BootStorage.addMDSettingsToGlobals
Ops.set(BootCommon.globals, "boot_md_mbr", md_mbr) if md_mbr != ""
BootCommon.InitializeLibrary(true, "grub2")
end

if !Mode.autoinst
if !Mode.autoinst && !Mode.autoupgrade
changed = grub_DisksChanged
if Ops.get_boolean(changed, "changed", false)
if BootCommon.askLocationResetPopup(
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bootloader/grub2base.rb
Expand Up @@ -102,7 +102,7 @@ def Dialogs
def Propose
if BootCommon.was_proposed
# workaround autoyast config is Imported thus was_proposed always set
if Mode.autoinst
if Mode.autoinst || Mode.autoupgrade
Builtins.y2milestone(
"autoinst mode we ignore meaningless was_proposed as it always set"
)
Expand Down
2 changes: 1 addition & 1 deletion src/modules/BootGRUB2EFI.rb
Expand Up @@ -81,7 +81,7 @@ def Propose
super

# for UEFI always set PMBR flag on disk (bnc#872054)
BootCommon.pmbr_action = :add if !BootCommon.was_proposed || Mode.autoinst
BootCommon.pmbr_action = :add if !BootCommon.was_proposed || Mode.autoinst || Mode.autoupgrade

# set secure boot always on (bnc #879486)
BootCommon.setSystemSecureBootStatus(true) if !BootCommon.was_proposed && Arch.x86_64;
Expand Down

0 comments on commit 1b30549

Please sign in to comment.