Hello community, here is the log from the commit of package perl-Bootloader checked in at Sun Jul 30 11:59:21 CEST 2006. -------- --- perl-Bootloader/perl-Bootloader.changes 2006-07-06 20:08:56.000000000 +0200 +++ perl-Bootloader/perl-Bootloader.changes 2006-07-28 17:46:28.000000000 +0200 @@ -1,0 +2,20 @@ +Fri Jul 28 17:40:51 CEST 2006 - jplack@suse.de + +- Tools.pm@Udev2Dev : CCISS driver maps slashes to bangs so we + have to reverse that, suppress ignorable warnings from udevinfo + (#189348) + +------------------------------------------------------------------- +Tue Jul 25 14:17:40 CEST 2006 - jplack@suse.de + +- do not use device symlink in sysfs as a criteria for device + detection which breaks on SmartArray controllers (#189348) +- bump version to 0.2.27 + +------------------------------------------------------------------- +Tue Jul 11 18:45:33 CEST 2006 - jplack@suse.de + +- move Partition2Disk function to Grub.pm as the only place of + usage and the only place to make it really work (#189348). + +------------------------------------------------------------------- Old: ---- perl-Bootloader-0.2.26.tar.bz2 New: ---- perl-Bootloader-0.2.27.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Bootloader.spec ++++++ --- /var/tmp/diff_new_pack.1pzCcQ/_old 2006-07-30 11:59:02.000000000 +0200 +++ /var/tmp/diff_new_pack.1pzCcQ/_new 2006-07-30 11:59:02.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package perl-Bootloader (Version 0.2.26) +# spec file for package perl-Bootloader (Version 0.2.27) # # Copyright (c) 2006 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.2.26 +Version: 0.2.27 Release: 1 Requires: perl >= %{perl_version} Requires: perl-gettext @@ -56,6 +56,17 @@ /sbin/update-bootloader %changelog -n perl-Bootloader +* Fri Jul 28 2006 - jplack@suse.de +- Tools.pm@Udev2Dev : CCISS driver maps slashes to bangs so we + have to reverse that, suppress ignorable warnings from udevinfo + (#189348) +* Tue Jul 25 2006 - jplack@suse.de +- do not use device symlink in sysfs as a criteria for device + detection which breaks on SmartArray controllers (#189348) +- bump version to 0.2.27 +* Tue Jul 11 2006 - jplack@suse.de +- move Partition2Disk function to Grub.pm as the only place of + usage and the only place to make it really work (#189348). * Thu Jul 06 2006 - jplack@suse.de - do not replace section names of new sections by default section name (#190529) ++++++ perl-Bootloader-0.2.26.tar.bz2 -> perl-Bootloader-0.2.27.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.2.26/lib/Bootloader/Core/GRUB.pm new/perl-Bootloader-0.2.27/lib/Bootloader/Core/GRUB.pm --- old/perl-Bootloader-0.2.26/lib/Bootloader/Core/GRUB.pm 2006-06-30 16:02:18.000000000 +0200 +++ new/perl-Bootloader-0.2.27/lib/Bootloader/Core/GRUB.pm 2006-07-28 17:46:28.000000000 +0200 @@ -44,6 +44,8 @@ C<< $line = Bootloader::Core::GRUB->CreateChainloaderLine (\%sectinfo, $grub_root); >> +C<< $disk = Bootloader::Core::GRUB->Partition2Disk ($partition); >> + C<< $sectin_info_ref = Bootloader::Core::GRUB->Section2Info (\@section_lines); >> C<< $lines_ref = Bootloader::Core::GRUB->Info2Section (\%section_info); >> @@ -139,13 +141,11 @@ my $self = shift; my $dev = shift; - if ($dev eq "") - { + unless ($dev) { $self->l_debug ("GRUB::GrubDev2UnixDev: Empty device to translate"); return $dev; } - if (defined ($dev) && $dev ne "" && $dev !~ /^\(.*\)$/) - { + if ($dev !~ /^\(.*\)$/) { $self->l_debug ("GRUB::GrubDev2UnixDev: Not translating device $dev"); return $dev; } @@ -162,10 +162,10 @@ } while ((my $unix, my $fw) = each (%{$self->{"device_map"}})) { - if ($fw eq "($dev)") - { + if ($dev eq $fw) { $dev = $unix; } + elsif } if (defined ($partition)) { @@ -179,8 +179,7 @@ } } } - my $md_dev = $self->Member2MD ($dev); - $dev = $md_dev if (defined ($md_dev)); + $dev = $self->Member2MD ($dev); $self->l_debug ("GRUB::GrubDev2UnixDev: Translated GRUB->UNIX: $original to $dev"); return $dev; } @@ -214,7 +213,7 @@ $dev = $members[0] || $dev; } # check for symbolic links as they are used for dev-by-id and such - if ( -l "$dev") { + if ( -l $dev) { $dev = sprintf("%s/%s", $dev=~m:^(.+)/[^/]*$:, readlink($dev)); $dev = $self->CanonicalPath($dev); } @@ -226,13 +225,11 @@ $partition = $dev_ref->[2] - 1; } } - while ((my $unix, my $fw) = each (%{$self->{"device_map"}})) - { - if ($unix eq $dev) - { - $dev = substr ($fw, 1, length ($fw) - 2); - } + + if ( exists $self->{"device_map"}->{$dev} ) { + $dev = $self->{"device_map"}->{$dev}; } + $dev = defined ($partition) ? "($dev,$partition)" : "($dev)"; @@ -423,7 +420,7 @@ my %devmap = (); foreach my $dm_entry (@device_map) { - if ($dm_entry =~ /^[ \t]*([^ \t#]+)[ \t]+([^ \t]+)[ \t]*$/) + if ($dm_entry =~ /^\s*(\([^\s#]+\))\s+(\S+)\s*$/) { $devmap{$2} = $1; } @@ -568,7 +565,7 @@ my @device_map = (); while ((my $unix, my $fw) = each (%{$self->{"device_map"}})) { - my $line = "$fw\t$unix"; + my $line = "($fw)\t$unix"; push @device_map, $line; } @@ -791,7 +788,7 @@ { $ret{$key} = $self->GrubPath2UnixPath ($val, $grub_root); } - elsif ($key eq "chainloader" || $key eq "initrd") + elsif ($key eq "chainloader") { if ($val =~ /^(.*)\+(\d+)/) { @@ -926,6 +923,35 @@ } } +=item +C<< $disk = Bootloader::Core::Grub->Partition2Disk ($partition); >> + +Gets the disk a partition resides on. As argument, it takes the partition +device node (eg. C<'/dev/hda3'>), returns the device node of the disk +holding the partition (eg. C), or undef if checking failed. + +=cut + +# string Partition2Disk (string partition) +sub Partition2Disk { + my $self = shift; + my $partition = shift; + + foreach my $dev_ref (@{$self->{"partitions"}}) + { + if ($dev_ref->[0] eq $partition) + { + return $dev_ref->[1]; + } + } + + # FIXME: + # check in device mapping as a fallback + + return $partition; +} + + sub Section2XenInfo { my $self = shift; my @lines = @{+shift}; @@ -1062,6 +1088,8 @@ if (exists ($sectinfo{"xen"})) { + # FIXME: looks like the wrong call to me: XenInfo2Section sounds more + # appropriate or not calling it @lines = @{$self->Section2XenInfo (\@lines)}; if (exists($sectinfo{"append"}) and diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.2.26/lib/Bootloader/Core.pm new/perl-Bootloader-0.2.27/lib/Bootloader/Core.pm --- old/perl-Bootloader-0.2.26/lib/Bootloader/Core.pm 2006-07-06 20:08:56.000000000 +0200 +++ new/perl-Bootloader-0.2.27/lib/Bootloader/Core.pm 2006-07-11 18:51:45.000000000 +0200 @@ -28,8 +28,6 @@ C<< ($device, $path) = Bootloader::Core->SplitDevPath ($path); >> -C<< $disk = Bootloader::Core->Partition2Disk ($partition); >> - C<< $quoted = Bootloader::Core->Quote ($text, $when); >> C<< $unquoted = Bootloader::Core->Unquote ($text); >> @@ -376,30 +374,6 @@ } =item -C<< $disk = Bootloader::Core->Partition2Disk ($partition); >> - -Gets the disk a partition resides on. As argument, it takes the partition -device node (eg. C<'/dev/hda3'>), returns the device node of the disk -holding the partition (eg. C), or undef if checking failed. - -=cut - -# string Partition2Disk (string partition) -sub Partition2Disk { - my $self = shift; - my $partition = shift; - - foreach my $dev_ref (@{$self->{"partitions"}}) - { - if ($dev_ref->[0] eq $partition) - { - return $dev_ref->[1]; - } - } - return $partition; -} - -=item C<< $quoted = Bootloader::Core->Quote ($text, $when); >> Puts a text to quotes. As arguments takes the text (string) and information diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.2.26/lib/Bootloader/Tools.pm new/perl-Bootloader-0.2.27/lib/Bootloader/Tools.pm --- old/perl-Bootloader-0.2.26/lib/Bootloader/Tools.pm 2006-07-06 20:08:56.000000000 +0200 +++ new/perl-Bootloader-0.2.27/lib/Bootloader/Tools.pm 2006-07-28 17:46:28.000000000 +0200 @@ -157,10 +157,14 @@ sub Udev2Dev { my $udev = shift; my $cmd = "udevinfo -q name -p /block/$udev"; - my $dev = qx{ $cmd }; + my $dev = qx{ $cmd 2>/dev/null }; chomp ($dev); - return $dev ? "/dev/$dev" : "/dev/$udev"; + $dev = $dev ? "/dev/$dev" : "/dev/$udev"; + # CCISS maps slashes to bangs so we have to reverse that. + $dev =~ s:!:/:g; + + return $dev; } =item @@ -178,7 +182,7 @@ my $sb="/sys/block"; opendir(BLOCK_DEVICES, "$sb") || die ("Failed to open dir $sb"); my @disks = grep { - !m/^\./ and -l "$sb/$_/device" and -r "$sb/$_/range" and qx{ cat $sb/$_/range } > 1 + !m/^\./ and -r "$sb/$_/range" and qx{ cat $sb/$_/range } > 1 } readdir(BLOCK_DEVICES); closedir BLOCK_DEVICES; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit-help@opensuse.org