Skip to content

Commit

Permalink
Merge pull request #356 from yast/stage1_proposal_fix
Browse files Browse the repository at this point in the history
Stage1 proposal fix
  • Loading branch information
jreidinger committed Aug 23, 2016
2 parents 1ec1511 + 2d84c61 commit 573b754
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
7 changes: 7 additions & 0 deletions package/yast2-bootloader.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Aug 23 14:20:15 UTC 2016 - jreidinger@suse.com

- fix proposing generic mbr if proposed to boot from MBR
( found during debugging bnc#994348 )
- 3.1.200

-------------------------------------------------------------------
Mon Jul 18 14:56:27 UTC 2016 - jreidinger@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-bootloader.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-bootloader
Version: 3.1.199
Version: 3.1.200
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
4 changes: 3 additions & 1 deletion src/lib/bootloader/stage1_proposal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def self.propose(stage1)

proposal.new(stage1).propose

log.info "proposed stage1 configuratopn #{stage1.inspect}"
log.info "proposed stage1 configuration #{stage1.inspect}"
end

protected
Expand Down Expand Up @@ -119,6 +119,8 @@ def propose_boot_location
end

assign_bootloader_device(selected_location)

selected_location
end

def separated_boot?
Expand Down
14 changes: 14 additions & 0 deletions test/stage1_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@
expect(subject.mbr?).to eq true
end

it "do not set generic_mbr if proposed boot from mbr" do
allow(Bootloader::Stage1Device).to receive(:new).and_call_original
target_map_stub("storage_mdraid.yaml")

allow(Yast::BootStorage).to receive(:mbr_disk)
.and_return("/dev/md")
allow(Yast::BootStorage).to receive(:BootPartitionDevice)
.and_return("/dev/md1")

subject.propose

expect(subject.generic_mbr?).to eq false
end

context "on ppc64" do
before do
allow(Yast::Arch).to receive(:architecture).and_return("ppc64")
Expand Down

0 comments on commit 573b754

Please sign in to comment.