aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packdrake.pm12
-rw-r--r--rpmtools.pm12
-rw-r--r--rpmtools.spec6
3 files changed, 20 insertions, 10 deletions
diff --git a/packdrake.pm b/packdrake.pm
index 5ab0b92..de22f9b 100644
--- a/packdrake.pm
+++ b/packdrake.pm
@@ -317,7 +317,7 @@ sub new {
sub cat_archive {
my $pid;
- foreach (@_) {
+ foreach (@_) {
my $packer = new packdrake;
#- update %data according to TOC_TRAILER of each archive.
@@ -342,7 +342,7 @@ sub list_archive {
my $packer = new packdrake($_);
my $count = scalar keys %{$packer->{data}};
- $packer->{log}("processing archive \"$_\"");
+ $packer->{log}->("processing archive \"$_\"");
print "$count files in archive, uncompression method is \"$packer->{uncompress}\"\n";
foreach my $file (@{$packer->{files}}) {
for ($packer->{data}{$file}[0]) {
@@ -364,13 +364,13 @@ sub extract_archive {
foreach my $file (@file) {
#- check for presence of file, but do not abort, continue with others.
unless ($packer->{data}{$file}) {
- $packer->{log}("packdrake: unable to find file $file in archive $packer->{archive}");
+ $packer->{log}->("packdrake: unable to find file $file in archive $packer->{archive}");
next;
}
my $newfile = "$dir/$file";
- $packer->{log}("extracting $file");
+ $packer->{log}->("extracting $file");
for ($packer->{data}{$file}[0]) {
/l/ && do { symlink_ $packer->{data}{$file}[1], $newfile; last; };
/d/ && do { mkdir_ $newfile; last; };
@@ -423,7 +423,7 @@ sub build_archive {
$compress && $uncompress and ($packer->{compress}, $packer->{uncompress}) = ($compress, $uncompress);
$tmpz and $packer->{tmpz} = $tmpz;
- $packer->{log}("choosing compression method with \"$packer->{compress}\" for archive $packer->{archive}");
+ $packer->{log}->("choosing compression method with \"$packer->{compress}\" for archive $packer->{archive}");
unlink $packer->{archive};
unlink $packer->{tmpz};
@@ -472,7 +472,7 @@ sub build_archive {
system "$ENV{LD_LOADER} cat '$packer->{tmpz}' >>'$packer->{archive}'";
$off1 += $siz1;
}
- $packer->{log}("real archive size of $packer->{archive} is $off1");
+ $packer->{log}->("real archive size of $packer->{archive} is $off1");
#- produce a TOC directly at the end of the file, follow with
#- a trailer with TOC summary and archive summary.
diff --git a/rpmtools.pm b/rpmtools.pm
index c65d300..f320a6f 100644
--- a/rpmtools.pm
+++ b/rpmtools.pm
@@ -198,11 +198,15 @@ sub build_hdlist {
open B, "| $ENV{LD_LOADER} packdrake -b${ratio}ds '$hdlist' '$dir' 400000";
foreach (@{$params->{depslist}}) {
if (my $keys = delete $names{$_->{name}}) {
- print B "$_\n" foreach @$keys;
+ foreach (@$keys) {
+ print B "$_\n";
+ }
}
}
foreach (values %names) {
- print B "$_\n" foreach @$_;
+ foreach (@$_) {
+ print B "$_\n";
+ }
}
close B or die "packdrake failed\n";
@@ -555,7 +559,9 @@ sub read_provides {
while (<$FILE>) {
chomp;
my ($k, @v) = split '@';
- $params->{provides}{$k}{$_} = undef foreach @v;
+ foreach (@v) {
+ $params->{provides}{$k}{$_} = undef;
+ }
}
}
diff --git a/rpmtools.spec b/rpmtools.spec
index 3886028..281db2c 100644
--- a/rpmtools.spec
+++ b/rpmtools.spec
@@ -1,5 +1,5 @@
%define name rpmtools
-%define release 9mdk
+%define release 10mdk
# do not modify here, see Makefile in the CVS
%define version 4.2
@@ -53,6 +53,10 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/perl5/man/*/*
%changelog
+* Wed Apr 10 2002 François Pons <fpons@mandrakesoft.com> 4.2-10mdk
+- make .pm file compatible with perl 5.005 and above (instead of
+ perl 5.6.0 and above).
+
* Wed Mar 20 2002 Frederic Lepied <flepied@mandrakesoft.com> 4.2-9mdk
- rebuild for rpm 4.0.4