Skip Menu |

This queue is for tickets about the Archive-Tar CPAN distribution.

Report information
The Basics
Id: 101640
Status: new
Priority: 0/
Queue: Archive-Tar

People
Owner: Nobody in particular
Requestors: buttafoo [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Hardlinks with long names confuse extraction
Date: Tue, 20 Jan 2015 22:23:22 +0000
To: "bug-Archive-Tar [...] rt.cpan.org" <bug-archive-tar [...] rt.cpan.org>
From: Robert Powers <buttafoo [...] hotmail.com>
Archive::Tar version: 2.04 Perl version: v5.18.2 - built for darwin-thread-multi-2level (Mac OS 10.10) If a tar contains a hardlink to another file within the tar and the path is too long, Archive::TAR will either truncate the filename or try to create a link to ././@LongHardLink It seems that linux and mac versions of tar cvzf handle long hardlink names differently. I'm seeing various errors. I've attached a script that reproduces the error. This is what I get when I run it: ERROR: Making hard link from '././@LongHardLink' to '/tmp/untar_dir/untar_bug/some/really/really/really/really/really/really/really/really/really/really/long/path/OneMoreSub/file.txt' failed at /Library/Perl/5.18/Archive/Tar.pm line 953. Archive::Tar::_make_special_file(Archive::Tar=HASH(0x7ff47d0032e8), Archive::Tar::File=HASH(0x7ff47e001178), "/tmp/untar_dir/untar_bug/some/really/really/really/really/rea"...) called at /Library/Perl/5.18/Archive/Tar.pm line 871 Archive::Tar::_extract_file(Archive::Tar=HASH(0x7ff47d0032e8), Archive::Tar::File=HASH(0x7ff47e001178)) called at /Library/Perl/5.18/Archive/Tar.pm line 535 Archive::Tar::_read_tar(Archive::Tar=HASH(0x7ff47d0032e8), IO::Zlib=GLOB(0x7ff47d04f8e0), HASH(0x7ff47c1c18a8)) called at /Library/Perl/5.18/Archive/Tar.pm line 217 Archive::Tar::read(Archive::Tar=HASH(0x7ff47d0032e8), "/tmp/untar_bug.tar.gz", 1, HASH(0x7ff47c1c18a8)) called at /Users/ropo/src/untar_bug.pl line 28 main::untar_tar() called at /Users/ropo/src/untar_bug.pl line 15 But I've also seen errors like this: ERROR: Making hard link from 'untar_bug/gravity-dashboard/node_modules/jsdom/node_modules/contextify/build/Release/MoreLevel/conte' to '/tmp/untar/untar_bug/gravity-dashboard/node_modules/jsdom/node_modules/contextify/build/Release/MoreLevel/obj.target/contextify.node' failed at /Library/Perl/5.18/Archive/Tar.pm line 953 The full filename should be: untar_bug/gravity-dashboard/node_modules/jsdom/node_modules/contextify/build/Release/MoreLevel/contextify.node

Message body is not shown because sender requested not to inline it.