Hello community, here is the log from the commit of package perl-Bootloader checked in at Wed Aug 6 01:55:08 CEST 2008. -------- --- perl-Bootloader/perl-Bootloader.changes 2008-07-29 16:01:40.000000000 +0200 +++ /mounts/work_src_done/STABLE/perl-Bootloader/perl-Bootloader.changes 2008-08-05 13:31:55.858175000 +0200 @@ -1,0 +2,7 @@ +Mon Aug 4 16:43:48 CEST 2008 - jsrain@suse.cz + +- fixed creating chainloader GRUB sections with disk remapping + (fate #301994) +- 0.4.67 + +------------------------------------------------------------------- Old: ---- perl-Bootloader-0.4.66.tar.bz2 New: ---- perl-Bootloader-0.4.67.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Bootloader.spec ++++++ --- /var/tmp/diff_new_pack.r31446/_old 2008-08-06 01:55:00.000000000 +0200 +++ /var/tmp/diff_new_pack.r31446/_new 2008-08-06 01:55:00.000000000 +0200 @@ -1,10 +1,17 @@ # -# spec file for package perl-Bootloader (Version 0.4.66) +# spec file for package perl-Bootloader (Version 0.4.67) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. -# This file and all modifications and additions to the pristine -# package are under the same license as the package itself. # +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + # Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -12,7 +19,7 @@ Name: perl-Bootloader -Version: 0.4.66 +Version: 0.4.67 Release: 1 Requires: perl-base = %{perl_version} Requires: e2fsprogs @@ -67,6 +74,10 @@ /usr/lib/bootloader %changelog +* Mon Aug 04 2008 jsrain@suse.cz +- fixed creating chainloader GRUB sections with disk remapping + (fate #301994) +- 0.4.67 * Tue Jul 29 2008 jsrain@suse.cz - return unmodified GRUB device from GrubDev2UnixDev when match not found in device map so that it is distinguishable GRUB device and ++++++ perl-Bootloader-0.4.66.tar.bz2 -> perl-Bootloader-0.4.67.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.4.66/lib/Bootloader/Core/GRUB.pm new/perl-Bootloader-0.4.67/lib/Bootloader/Core/GRUB.pm --- old/perl-Bootloader-0.4.66/lib/Bootloader/Core/GRUB.pm 2008-07-29 14:45:47.000000000 +0200 +++ new/perl-Bootloader-0.4.67/lib/Bootloader/Core/GRUB.pm 2008-08-05 12:43:22.000000000 +0200 @@ -1493,6 +1493,28 @@ { return \@lines; } + + + # remap the first disk to the chainloader if requested + # store the information about remapped disk + my $remap_device = undef; + if (defined ($sectinfo{"remap"}) && $sectinfo{"remap"} == "true" && defined ($sectinfo{"chainloader"})) + { + $self->l_milestone ("GRUB::Info2Section: Remapping the device map"); + $remap_device = $sectinfo{"chainloader"}; + $remap_device = $self->UnixDev2GrubDev ($remap_device); + if ($remap_device =~ /\(([^,]+),([^,]+)\)/) { + $remap_device = "$1"; + } + elsif ($remap_device =~ /\(([^,]+)\)/) { + $remap_device = "$1"; + } + else { + $self->l_error ("GRUB::Info2Section: Not valid device $remap_device"); + } + $self->l_milestone ("GRUB::Info2Section: Device to remap: $remap_device"); + } + my $grub_root = ""; if (defined ($sectinfo{"image"}) && defined ($sectinfo{"initrd"})) { @@ -1507,6 +1529,13 @@ $grub_root = $self->UnixDev2GrubDev ( exists $sectinfo{"root"} ? delete($sectinfo{"root"}) : $boot_dev ); + $self->l_milestone ("Set GRUB's root to $grub_root"); + # FIXES the above - maybe: To make makeactive without parameter work, + # one needs to pass the chainloader device + if (exists $sectinfo{"chainloader"}) { + $self->l_milestone ("Setting GRUB's root to $grub_root ($sectinfo{\"chainloader\"})"); + $grub_root = $self->UnixDev2GrubDev ($sectinfo{"chainloader"}); + } } if ($type eq "xen") { @@ -1607,6 +1636,12 @@ $line_ref = undef; } } + elsif ($key eq "map") + { + #just remove them for now, it will work even though it is not the best solution + # FIXME when time permits + $line_ref = undef; + } defined $line_ref ? $line_ref : (); } @lines; @@ -1676,13 +1711,13 @@ } elsif ($key eq "remap") { - push @lines, { + unshift @lines, { "key" => "map", - "value" => "(hd0) ".$grub_root, + "value" => "(hd0) ($remap_device)", }; - push @lines, { + unshift @lines, { "key" => "map", - "value" => $grub_root." (hd0)", + "value" => "($remap_device) (hd0)", }; } elsif ($key eq "makeactive") @@ -1697,6 +1732,7 @@ my $ret = $self->FixSectionLineOrder (\@lines, ["title"]); + return $ret; } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org