--y96v7rNg6HAoELs5
Content-Type: multipart/mixed; boundary="Hlh2aiwFLCZwGcpw"
Content-Disposition: inline
--Hlh2aiwFLCZwGcpw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
The following patch allows SystemImager::Common to run under use strict; It
also changes one of the file handler calls to pass by reference instead of
using filehandlers from package global space, which is generally frowned
upon.
-Sean
--=20
_______________________________________________________________________
=09
Sean Dague [EMAIL PROTECTED] http://dague.net
There is no silver bullet. Plus, werewolves make better neighbors than
zombies, and they tend to keep the vampire population down.
_______________________________________________________________________
--Hlh2aiwFLCZwGcpw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="systemimager-common-strict.diff"
Content-Transfer-Encoding: quoted-printable
Index: lib/SystemImager/Common.pm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/systemimager/systemimager/lib/SystemImager/Common.pm,v
retrieving revision 1.2.4.1.2.14
diff -u -r1.2.4.1.2.14 Common.pm
--- lib/SystemImager/Common.pm 2 Aug 2002 23:42:48 -0000 1.2.4.1.2.14
+++ lib/SystemImager/Common.pm 7 Aug 2002 21:09:19 -0000
@@ -8,6 +8,9 @@
# $Id: Common.pm,v 1.2.4.1.2.14 2002/08/02 23:42:48 brianfinley Exp $
#
=20
+use strict;
+use vars qw($version_number $VERSION);
+
$version_number=3D"SYSTEMIMAGER_VERSION_STRING";
$VERSION =3D $version_number;
=20
@@ -19,7 +22,7 @@
my $garbage_in=3D<STDIN>;
chomp $garbage_in;
unless($garbage_in) { $garbage_in =3D $_[1]; }
- $garbage_out =3D $garbage_in;
+ my $garbage_out =3D $garbage_in;
return $garbage_out;
}
=20
@@ -33,6 +36,7 @@
sub get_boot_flavors {
my ($class, $arch, $version, $where) =3D @_;
=20
+ my @allfiles =3D ();
my $file_flavor =3D "";
my $file_version =3D "";
my %kernel_flavors =3D ();
@@ -43,14 +47,14 @@
# if $where contains a "/", we look in a local directory named $where
# otherwise, we look on a remote server named $where
if (m{.*/.*}) {
- $autoinstall_bootdir =3D $where;
+ my $autoinstall_bootdir =3D $where;
opendir BOOTDIR, "$autoinstall_bootdir/$arch" or return undef;
@allfiles =3D readdir BOOTDIR;
close BOOTDIR;
}
else {
- $server =3D $where;
- $cmd =3D "rsync $server"."::boot/$arch/";
+ my $server =3D $where;
+ my $cmd =3D "rsync $server"."::boot/$arch/";
open(RSYNC, "$cmd |")
or do { print "Error running rsync: $!\n"; return undef; };
while (<RSYNC>) {
@@ -294,14 +298,14 @@
=20
my $cmd =3D "sfdisk -l -uM /dev/$disk";
open (PARTITION_TOOL_OUTPUT, "$cmd|");=20
- _turn_sfdisk_output_into_generic_partitionschemes_file($disk);
+ _turn_sfdisk_output_into_generic_partitionschemes_file($disk, \*=
PARTITION_TOOL_OUTPUT);
close (PARTITION_TOOL_OUTPUT);
=20
} elsif ($partition_tool eq "old_sfdisk_file") {
=20
my $file =3D $disk;
open (PARTITION_TOOL_OUTPUT, "<$file") or croak("Couldn't open $fi=
le for reading!");=20
- _turn_sfdisk_output_into_generic_partitionschemes_file($file);
+ _turn_sfdisk_output_into_generic_partitionschemes_file($file, \*=
PARTITION_TOOL_OUTPUT);
close (PARTITION_TOOL_OUTPUT);
=20
}
@@ -317,10 +321,10 @@
# _turn_sfdisk_output_into_generic_partitionschemes_file($old_sfdisk_file);
sub _turn_sfdisk_output_into_generic_partitionschemes_file {
=20
- (my $disk) =3D @_;
+ my ($disk, $PARTITION_TOOL_OUTPUT) =3D @_;
my $units;
=20
- @partition_tool_output =3D <PARTITION_TOOL_OUTPUT>;
+ my @partition_tool_output =3D <*$PARTITION_TOOL_OUTPUT>;
=20
# Find partitions that are closest to the end of the disk. -BEF-
my $end_of_last_partition_on_disk =3D 0;
--Hlh2aiwFLCZwGcpw--
--y96v7rNg6HAoELs5
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9UY2rSamXem9TdyYRAie9AKCLFHoDYjDbEFk48kM7LVsBaFjxtgCfQwih
L7YBpwGHMSMegv8s0aUkYDg=
=mMf5
-----END PGP SIGNATURE-----
--y96v7rNg6HAoELs5--
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Sisuite-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/sisuite-devel