Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/merge_after_SP2_release' into dm…
Browse files Browse the repository at this point in the history
…_translation_fix
  • Loading branch information
jreidinger committed Oct 19, 2016
2 parents f066c85 + 8ebf130 commit fca3d77
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
4 changes: 3 additions & 1 deletion package/yast2-bootloader.changes
@@ -1,6 +1,8 @@
-------------------------------------------------------------------
Tue Oct 18 08:28:37 UTC 2016 - jreidinger@suse.com
Thu Oct 13 12:26:53 UTC 2016 - jreidinger@suse.com

- Do not require syslinux on target system during installation
(bsc#1004229)
- fix installation on dm raids to not use mapper device and instead
use underlaying device (bsc#1004921)
- 3.1.205
Expand Down
4 changes: 0 additions & 4 deletions package/yast2-bootloader.spec
Expand Up @@ -46,10 +46,6 @@ Requires: rubygem(%rb_default_ruby_abi:cfa_grub2) >= 0.5.1
# lenses are needed here
Requires: augeas-lenses

%ifarch %ix86 x86_64
Requires: syslinux
%endif

Requires: yast2-ruby-bindings >= 1.0.0

Summary: YaST2 - Bootloader Configuration
Expand Down
3 changes: 2 additions & 1 deletion src/lib/bootloader/grub2.rb
Expand Up @@ -139,7 +139,8 @@ def packages

res << "grub2"

if stage1.generic_mbr?
# do not require it in insts-sys as insts-sys have it itself (bsc#1004229)
if stage1.generic_mbr? && !Yast::Stage.initial
# needed for generic _mbr binary files
res << "syslinux"
end
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bootloader/mbr_update.rb
Expand Up @@ -66,7 +66,7 @@ def install_generic_mbr
log.info "Copying generic MBR code to #{disk}"
# added fix 446 -> 440 for Vista booting problem bnc #396444
command = ["/bin/dd", "bs=440", "count=1", "if=#{generic_mbr_file}", "of=#{disk}"]
Yast::Execute.on_target(*command)
Yast::Execute.locally(*command)
end
end

Expand Down
8 changes: 4 additions & 4 deletions test/mbr_update_test.rb
Expand Up @@ -112,7 +112,7 @@ def stage1(devices: [], activate: false, generic_mbr: false)
allow(Yast::BootStorage).to receive(:mbr_disk)
.and_return("/dev/sda")

expect(Yast::Execute).to receive(:on_target) do |*args|
expect(Yast::Execute).to receive(:locally) do |*args|
return nil unless args.first =~ /dd/
expect(args).to be_include("of=/dev/sda")
end
Expand All @@ -125,15 +125,15 @@ def stage1(devices: [], activate: false, generic_mbr: false)

allow(::Bootloader::Stage1Device).to receive(:new).with("/dev/md0")
.and_return(double(real_devices: ["/dev/sda1", "/dev/sdb1"]))
expect(Yast::Execute).to receive(:on_target).at_least(:twice) do |*args|
expect(Yast::Execute).to receive(:locally).at_least(:twice) do |*args|
next nil unless args.first =~ /dd/
next nil unless args.include?("of=/dev/sdb")
expect(args).to be_include("of=/dev/sda")
end
subject.run(stage1(generic_mbr: true))
end

it "install syslinux if non on initial stage" do
it "install syslinux if not on initial stage" do
allow(Yast::Stage).to receive(:initial).and_return(false)
expect(Yast::PackageSystem).to receive(:Install).with("syslinux")

Expand All @@ -148,7 +148,7 @@ def stage1(devices: [], activate: false, generic_mbr: false)
allow(Yast::BootStorage).to receive(:mbr_disk)
.and_return("/dev/sda")

expect(Yast::Execute).to receive(:on_target) do |*args|
expect(Yast::Execute).to receive(:locally) do |*args|
return nil unless args.first =~ /dd/
expect(args.any? { |a| a =~ /if=.*gptmbr.bin/ }).to eq true
end
Expand Down

0 comments on commit fca3d77

Please sign in to comment.