Hello community, here is the log from the commit of package perl-Bootloader checked in at Sun Aug 12 00:09:38 CEST 2007. -------- --- perl-Bootloader/perl-Bootloader.changes 2007-08-06 15:53:33.000000000 +0200 +++ /mounts/work_src_done/STABLE/perl-Bootloader/perl-Bootloader.changes 2007-08-10 15:09:28.000000000 +0200 @@ -1,0 +2,7 @@ +Fri Aug 10 15:08:23 CEST 2007 - sf@suse.de + +- enable configfile sections: + - add CreateConfigFileLine() + - some comments + +------------------------------------------------------------------- Old: ---- perl-Bootloader-0.4.18.tar.bz2 New: ---- perl-Bootloader-0.4.19.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Bootloader.spec ++++++ --- /var/tmp/diff_new_pack.KR3286/_old 2007-08-12 00:09:20.000000000 +0200 +++ /var/tmp/diff_new_pack.KR3286/_new 2007-08-12 00:09:20.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package perl-Bootloader (Version 0.4.18) +# spec file for package perl-Bootloader (Version 0.4.19) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -11,7 +11,7 @@ # norootforbuild Name: perl-Bootloader -Version: 0.4.18 +Version: 0.4.19 Release: 1 Requires: perl >= %{perl_version} Requires: perl-gettext @@ -66,6 +66,10 @@ /usr/lib/bootloader %changelog +* Fri Aug 10 2007 - sf@suse.de +- enable configfile sections: + - add CreateConfigFileLine() + - some comments * Mon Aug 06 2007 - aosthof@suse.de - Adapted yast2-bootloader-style comments to be correctly detected by yast2-bootloader (fate #302407) ++++++ perl-Bootloader-0.4.18.tar.bz2 -> perl-Bootloader-0.4.19.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.4.18/lib/Bootloader/Core/GRUB.pm new/perl-Bootloader-0.4.19/lib/Bootloader/Core/GRUB.pm --- old/perl-Bootloader-0.4.18/lib/Bootloader/Core/GRUB.pm 2007-08-02 14:31:00.000000000 +0200 +++ new/perl-Bootloader-0.4.19/lib/Bootloader/Core/GRUB.pm 2007-08-10 15:09:28.000000000 +0200 @@ -1111,6 +1111,8 @@ { if ($type eq "menu") { $ret{"root"} = $self->GrubDev2UnixDev ($val); + # FIXME: do we need to set $grub_root here? +# $grub_root = $val; } else { $grub_root = $val; @@ -1310,6 +1312,37 @@ } } + +=item +C<< $line = Bootloader::Core::Grub->CreateConfigfileLine (\%sectinfo, $grub_root); >> + +Creates a line with the configfile command for GRUB's menu.lst. As arguments. +it takes a hash containing information about the section and the root +device specified by the GRUB's root command. Returns the line to be written +to menu.lst (without the leading configfile keyword). + +=cut + +#string CreateConfigfileLine (map sectinfo, string grub_root) +sub CreateConfigfileLine { + my $self = shift; + my $sectinfo_ref = shift; + my $grub_root = shift || ""; + + my $line = $sectinfo_ref->{"configfile"}; + + $self->l_milestone ("GRUB::CreateConfigfileLine: $line"); + $line = $self->UnixDev2GrubDev ($line); + + if (substr ($line, 0, length ($grub_root)) eq $grub_root) + { + $line = substr ($line, length ($grub_root)); + } + + return $line; +} + + =item C<< $disk = Bootloader::Core::Grub->Partition2Disk ($partition); >> @@ -1453,7 +1486,7 @@ my $line_ref = $_; my $key = $line_ref->{"key"}; - if ($key eq "root" or $key eq "rootnoverify" or $key eq "configfile") + if ($key eq "root" or $key eq "rootnoverify") { # always remove old root line $line_ref = undef; @@ -1494,6 +1527,8 @@ elsif ($key eq "chainloader") { if ($type eq "other" and defined ($sectinfo{$key})) { + # create a translated chainloader line in the line_ref, but + # delete it (and the blockoffset entry) in the sectinfo hash $line_ref->{"value"} = $self->CreateChainloaderLine (\%sectinfo, $grub_root); delete ($sectinfo{$key}); delete ($sectinfo{"blockoffset"}); @@ -1502,6 +1537,16 @@ $line_ref = undef; } } + elsif ($key eq "configfile") + { + if ($type eq "other" and defined ($sectinfo{$key})) { + $line_ref->{"value"} = $self->CreateConfigfileLine (\%sectinfo, $grub_root); + delete ($sectinfo{$key}); + } + else { + $line_ref = undef; + } + } defined $line_ref ? $line_ref : (); } @lines; @@ -1543,6 +1588,7 @@ }; } + # adapt entries if the menu.lst uses different key names etc. while ((my $key, my $value) = each (%sectinfo)) { if ($key eq "name") @@ -1553,6 +1599,8 @@ } elsif ($key eq "chainloader") { + # FIXME: is this necessary? It seems this is already handled in a + # loop above (where the sectinfo stuff for chainloader is deleted). push @lines, { "key" => $key, "value" => $self->CreateChainloaderLine (\%sectinfo, $grub_root), @@ -1560,6 +1608,7 @@ } elsif ($key eq "configfile") { + # dummy/placeholder entry: do we need this? push @lines, { "key" => $key, "value" => $value, ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org