aboutsummaryrefslogtreecommitdiffstats
path: root/packdrake-pm/packdrake.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-26 18:30:10 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-26 18:30:10 +0000
commitf5e936cc6c5cb364b774149c79e6bdbb5d3d3d15 (patch)
treead0d99927b4afdb82607adfc25d4728ab6f081f3 /packdrake-pm/packdrake.pm
parent1c85849a7e6707036c20c113ba8407fd70de1fde (diff)
downloadrpmtools-f5e936cc6c5cb364b774149c79e6bdbb5d3d3d15.tar
rpmtools-f5e936cc6c5cb364b774149c79e6bdbb5d3d3d15.tar.gz
rpmtools-f5e936cc6c5cb364b774149c79e6bdbb5d3d3d15.tar.bz2
rpmtools-f5e936cc6c5cb364b774149c79e6bdbb5d3d3d15.tar.xz
rpmtools-f5e936cc6c5cb364b774149c79e6bdbb5d3d3d15.zip
packdrake.pm is now perl_checker compliant4.5.4
Diffstat (limited to 'packdrake-pm/packdrake.pm')
-rw-r--r--packdrake-pm/packdrake.pm28
1 files changed, 14 insertions, 14 deletions
diff --git a/packdrake-pm/packdrake.pm b/packdrake-pm/packdrake.pm
index 7116ff0..fb2b497 100644
--- a/packdrake-pm/packdrake.pm
+++ b/packdrake-pm/packdrake.pm
@@ -171,7 +171,7 @@ sub read_toc {
#- read data for file.
read ARCHIVE, $toc, 16*$packer->{toc_f_count} or die "packdrake: cannot read toc of archive file $file\n";
- @toc_data = unpack "N". 4*$packer->{toc_f_count}, $toc;
+ @toc_data = unpack "N" . 4*$packer->{toc_f_count}, $toc;
close ARCHIVE;
@@ -200,11 +200,11 @@ sub catsksz {
my ($input, $seek, $siz, $output) = @_;
my ($buf, $sz);
- while (($sz = sysread($input, $buf, $seek > 65536 ? 65536 : $seek))) {
+ while ($sz = sysread($input, $buf, $seek > 65536 ? 65536 : $seek)) {
$seek -= $sz;
last unless $seek > 0;
}
- while (($sz = sysread($input, $buf, $siz > 65536 ? 65536 : $siz))) {
+ while ($sz = sysread($input, $buf, $siz > 65536 ? 65536 : $siz)) {
$siz -= $sz;
syswrite($output, $buf);
last unless $siz > 0;
@@ -222,7 +222,7 @@ sub cat_compress {
local *FILE;
open FILE, $srcfile or die "packdrake: cannot open $srcfile: $!\n";
$siz = -s $srcfile;
- while (($sz = sysread(FILE, $buf, $siz > 65536 ? 65536 : $siz))) {
+ while ($sz = sysread(FILE, $buf, $siz > 65536 ? 65536 : $siz)) {
$siz -= $sz;
syswrite(F, $buf);
last unless $siz > 0;
@@ -280,7 +280,7 @@ sub compute_closure {
};
}
}
- } while (@file > 0);
+ } while @file > 0;
keys %file;
}
@@ -330,7 +330,7 @@ sub cat_archive {
open STDIN, "<$_" or die "packdrake: unable to open archive $_\n";
open STDERR, ">/dev/null" or die "packdrake: unable to open /dev/null\n";
- exec (($ENV{LD_LOADER} ? ($ENV{LD_LOADER}) : ()), split " ", $packer->{uncompress});
+ exec (($ENV{LD_LOADER} ? $ENV{LD_LOADER} : ()), split " ", $packer->{uncompress});
die "packdrake: unable to cat the archive with $packer->{uncompress}\n";
}
@@ -346,9 +346,9 @@ sub list_archive {
print "$count files in archive, uncompression method is \"$packer->{uncompress}\"\n";
foreach my $file (@{$packer->{files}}) {
for ($packer->{data}{$file}[0]) {
- /l/ && do { printf "l %13c %s -> %s\n", ' ', $file, $packer->{data}{$file}[1]; last; };
- /d/ && do { printf "d %13c %s\n", ' ', $file; last; };
- /f/ && do { printf "f %12d %s\n", $packer->{data}{$file}[4], $file; last; };
+ /l/ && do { printf "l %13c %s -> %s\n", ' ', $file, $packer->{data}{$file}[1]; last };
+ /d/ && do { printf "d %13c %s\n", ' ', $file; last };
+ /f/ && do { printf "f %12d %s\n", $packer->{data}{$file}[4], $file; last };
}
}
}
@@ -372,8 +372,8 @@ sub extract_archive {
$packer->{log}->("extracting $file");
for ($packer->{data}{$file}[0]) {
- /l/ && do { symlink_ $packer->{data}{$file}[1], $newfile; last; };
- /d/ && do { $dir and mkdir_ $newfile; last; };
+ /l/ && do { symlink_ $packer->{data}{$file}[1], $newfile; last };
+ /d/ && do { $dir and mkdir_ $newfile; last };
/f/ && do { $dir and mkdir_ dirname $newfile;
my $data = $packer->{data}{$file};
$extract_table{$data->[1]} ||= [ $data->[2], [] ];
@@ -490,9 +490,9 @@ sub build_archive {
#- specific according to type.
#- with this version, only f has specific data other than strings.
for ($packer->{data}{$file}[0]) {
- /d/ && do { push @data_d, $file; last; };
- /l/ && do { push @data_l, $file; last; };
- /f/ && do { push @data_f, $file; $toc_data .= pack("NNNN", @{$packer->{data}{$file}}[1..4]); last; };
+ /d/ && do { push @data_d, $file; last };
+ /l/ && do { push @data_l, $file; last };
+ /f/ && do { push @data_f, $file; $toc_data .= pack("NNNN", @{$packer->{data}{$file}}[1..4]); last };
die "packdrake: unknown extension $_\n";
}
}