Skip to content

Commit

Permalink
Merge 47463f7 into 965a4c1
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Sep 21, 2022
2 parents 965a4c1 + 47463f7 commit 96a1f70
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
6 changes: 6 additions & 0 deletions package/yast2-bootloader.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Sep 21 20:42:31 UTC 2022 - Josef Reidinger <jreidinger@suse.com>

- write stage1 location on transactional systems (bsc#1128853)
- 4.5.6

-------------------------------------------------------------------
Wed Sep 21 06:24:02 UTC 2022 - Michal Filka <mfilka@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.5
Version: 4.5.6
Release: 0
Summary: YaST2 - Bootloader Configuration
License: GPL-2.0-or-later
Expand Down
15 changes: 9 additions & 6 deletions src/lib/bootloader/grub2.rb
Expand Up @@ -64,12 +64,15 @@ def write(etc_only: false)
pmbr_setup(*::Yast::BootStorage.gpt_disks(stage1.devices))

# powernv must not call grub2-install (bnc#970582)
if !Yast::Arch.board_powernv && !etc_only
failed = @grub_install.execute(
devices: stage1.devices, secure_boot: secure_boot, trusted_boot: trusted_boot,
update_nvram: update_nvram
)
failed.each { |f| stage1.remove_device(f) }
if !Yast::Arch.board_powernv
if !etc_only
failed = @grub_install.execute(
devices: stage1.devices, secure_boot: secure_boot, trusted_boot: trusted_boot,
update_nvram: update_nvram
)
failed.each { |f| stage1.remove_device(f) }
end
# write stage1 location
stage1.write
end
# Do some mbr activations ( s390 do not have mbr nor boot flag on its disks )
Expand Down
6 changes: 1 addition & 5 deletions test/grub2_test.rb
Expand Up @@ -55,16 +55,12 @@
allow(Yast::BootStorage).to receive(:gpt_disks).and_return(["/dev/sdb"])
end

it "writes stage1 location on non-transactional systems" do
it "writes stage1 location" do
stage1 = double(Bootloader::Stage1, devices: [], generic_mbr?: false)
expect(stage1).to receive(:write)
allow(Bootloader::Stage1).to receive(:new).and_return(stage1)

subject.write

expect(stage1).to_not receive(:write)

subject.write(etc_only: true)
end

it "changes pmbr flag as specified in pmbr_action for all boot devices with gpt label" do
Expand Down

0 comments on commit 96a1f70

Please sign in to comment.