On 2010-08-25 13:17:57, KANE wrote:
Show quoted text> I can't reproduce this issue:
>
> [kane@coke ~...archive-extract/tmp]$ cat x.pl
> use Archive::Extract;
>
> $ae = Archive::Extract->new( archive => shift );
> $ae->extract( to => "test.out" ) or die $ae->error;
>
> print "Done\n"; # should not be reached
> [kane@coke ~...archive-extract/tmp]$ file broken_backpan.txt.gz
> broken_backpan.txt.gz: gzip compressed data
> [kane@coke ~...archive-extract/tmp]$ perlc x.pl broken_backpan.txt.gz
> Done
> [kane@coke ~...archive-extract/tmp]$ head test.out
> README 950893140 1800
> authors/id/A/AA/AADLER/Games-LogicPuzzle-0.10.readme 1048215370 679
> authors/id/A/AA/AADLER/Games-LogicPuzzle-0.10.tar.gz 1048217971 4778
> authors/id/A/AA/AADLER/Games-LogicPuzzle-0.12.readme 1099325608 679
> authors/id/A/AA/AADLER/Games-LogicPuzzle-0.12.tar.gz 1099326548 4692
> authors/id/A/AA/AADLER/Games-LogicPuzzle-0.13.readme 1099325608 679
> authors/id/A/AA/AADLER/Games-LogicPuzzle-0.13.tar.gz 1099330277 4921
> authors/id/A/AA/AADLER/Games-LogicPuzzle-0.20.readme 1138632804 679
> authors/id/A/AA/AADLER/Games-LogicPuzzle-0.20.zip 1138654340 8989
> authors/id/A/AA/AADLER/Inline-Octave-0.10.tar.gz 1005450827 6972
>
> A::E: $VERSION = '0.42';
> C::Z: $VERSION = '2.015';
>
> Can you verify that the sample file you pointed at is indeed the
> corrupted file you used in
> your tests?
>
> Thanks,
It can still be reproduced:
---------------------------------------------------
$ cd /tmp && wget -Otest.tar.gz
https://cpan.metacpan.org/authors/id/B/BI/BINGOS/Archive-Tar-2.18.tar.gz && truncate -s 60000 test.tar.gz && perl -e 'use Archive::Extract; $ae = Archive::Extract->new( archive => shift ); $ae->extract( to => "test.out" ) or die $ae->error; print "Done\n"; ' test.tar.gz
--2016-11-20 19:42:40--
https://cpan.metacpan.org/authors/id/B/BI/BINGOS/Archive-Tar-2.18.tar.gz
Resolving cpan.metacpan.org (cpan.metacpan.org)... 151.101.36.129
Connecting to cpan.metacpan.org (cpan.metacpan.org)|151.101.36.129|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 63759 (62K) [application/x-gzip]
Saving to: ‘test.tar.gz’
test.tar.gz 100%[============================================================================================================================================================>] 62.26K --.-KB/s in 0.1s
2016-11-20 19:42:40 (638 KB/s) - ‘test.tar.gz’ saved [63759/63759]
Read error on tarfile (missing data) 'Archive-Tar-2.18/lib/Archive/Tar/File.pm' at offset unknown at /usr/share/perl5/Archive/Extract.pm line 894.
Done
---------------------------------------------------
"Done" is printed also with PREFER_BIN=1:
---------------------------------------------------
$ cd /tmp && wget -Otest.tar.gz
https://cpan.metacpan.org/authors/id/B/BI/BINGOS/Archive-Tar-2.18.tar.gz && truncate -s 60000 test.tar.gz && perl -e 'use Archive::Extract; $Archive::Extract::PREFER_BIN=1; $ae = Archive::Extract->new( archive => shift ); $ae->extract( to => "test.out" ) or die $ae->error; print "Done\n"; ' test.tar.gz
...
Error listing contents of archive '/tmp/test.tar.gz': Archive-Tar-2.18/
Archive-Tar-2.18/lib/
Archive-Tar-2.18/t/
...
Archive-Tar-2.18/lib/Archive/Tar/
Archive-Tar-2.18/lib/Archive/Tar.pm
gzip: /tmp/test.tar.gz: unexpected end of file
Archive-Tar-2.18/lib/Archive/Tar/Constant.pm
Archive-Tar-2.18/lib/Archive/Tar/File.pm
/bin/tar: Unexpected EOF in archive
/bin/tar: Error is not recoverable: exiting now
at -e line 1.
Read error on tarfile (missing data) 'Archive-Tar-2.18/lib/Archive/Tar/File.pm' at offset unknown at /usr/share/perl5/Archive/Extract.pm line 894.
Done
---------------------------------------------------