Bug#539355: perl-modules: Archive::Tar fails to read tar files after a first error
Vincent Lefevre
vincent at vinc17.org
Fri Jul 31 00:52:16 UTC 2009
Package: perl-modules
Version: 5.10.0-24
Severity: normal
Archive::Tar fails to read tar files after a first error.
For instance, consider the following script:
------------------------------------------------------------
#!/usr/bin/env perl
use Archive::Tar;
$Archive::Tar::WARN = 0;
foreach my $file (@ARGV)
{
my $tar = Archive::Tar->new;
if (defined $tar->read($file))
{
my $err = $tar->error();
warn "$err ($file)\n" if $err ne '';
}
else
{
warn "Cannot read tar file $file\n";
}
}
------------------------------------------------------------
Create a tar file tst.tar. As shown below, when tst.tar is read
without an error first, no problems. But if one provides a file
that is not a tar file first, one also gets an error for tst.tar!
$ script.pl tst.tar tst.tar
$ script.pl /etc/debian_version tst.tar
Cannot read tar file /etc/debian_version
Cannot read enough bytes from the tarfile (tst.tar)
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.30-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash
Versions of packages perl-modules depends on:
ii perl 5.10.0-24 Larry Wall's Practical Extraction
perl-modules recommends no packages.
perl-modules suggests no packages.
-- no debconf information
More information about the Perl-maintainers
mailing list