Skip to content

Commit

Permalink
Merge pull request #684 from yast/fix_migration_sp5
Browse files Browse the repository at this point in the history
Fix migration sp5
  • Loading branch information
jreidinger committed Apr 26, 2023
2 parents d5ed9d7 + fd6780d commit 68e28c2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
6 changes: 6 additions & 0 deletions package/yast2-bootloader.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Apr 25 20:22:30 UTC 2023 - Josef Reidinger <jreidinger@suse.com>

- Do not overwrite user selection during migration (bsc#1210811)
- 4.5.9

-------------------------------------------------------------------
Wed Feb 8 15:30:25 UTC 2023 - Josef Reidinger <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: 4.5.8
Version: 4.5.9
Release: 0
Summary: YaST2 - Bootloader Configuration
License: GPL-2.0-or-later
Expand Down
3 changes: 2 additions & 1 deletion src/lib/bootloader/proposal_client.rb
Expand Up @@ -226,7 +226,8 @@ def propose_for_update(force_reset)
# old one is grub2, but mismatch of EFI and non-EFI (bsc#1081355)
elsif old_bootloader =~ /grub2/ && old_bootloader != current_bl.name
raise MismatchBootloader.new(old_bootloader, current_bl.name)
elsif !current_bl.proposed? || force_reset
elsif force_reset
log.warn "forced proposal during migration. Will change existing config"
# Repropose the type. A regular Reset/Propose is not enough.
# For more details see bnc#872081
Yast::Bootloader.Reset
Expand Down
11 changes: 0 additions & 11 deletions test/bootloader_proposal_client_test.rb
Expand Up @@ -187,17 +187,6 @@
subject.make_proposal({})
end

it "reproprose from scrach during update if old bootloader is not grub2" do
allow(Yast::Mode).to receive(:update).and_return(true)

expect(subject).to receive("old_bootloader").and_return("grub").at_least(:once)

expect(Yast::Bootloader).to receive(:Reset).at_least(:once)
expect(Bootloader::BootloaderFactory).to receive(:proposed).and_call_original

subject.make_proposal({})
end

it "do not propose during update if if old bootloader is none" do
allow(Yast::Mode).to receive(:update).and_return(true)

Expand Down

0 comments on commit 68e28c2

Please sign in to comment.