Subject: | Archive::Tar Does Not Handle A Proper Hard Link Name |
Dear Jos Boumans,
Hi. This is imacat. I found a bug in your Archive-Tar (0.23) that does not handle a proper hard link name. In your Archive/Tar/Std.pm line 133, you have:
link $entry->{linkname}, $file or
$^W && carp ("Hard linking ", $entry->{linkname},
" to ", $entry->{name}, ", failed.\n");
At that time cwd is the directory of that processing file, but $entry->{linkname} is a relative path to the archive root. This link doomed to fail.
To fix it, I suggest either turn $entry->{linkname} to absolute, or temporary move back to the archive root to do the "link". Sorry, I don't know how to do this in simple in the current Archive-Tar, so I did not include a patch for this. It's better to leave this to you. ^^;
I found this problem while I was working on my Locale::Maketext::Gettext. I mistakenly included 2 hard link test suite files in my release, and CPAN testers report failures. I tried several platforms but still unable to reproduce that error. Finally I notice that CPAN tester uses CPANPLUS, CPANPLUS uses Archive-Tar, and the test suite hard link files are not extracted from Archive-Tar. It's my mistake to include these hard links files in my release. But This hard link problem should also be reported and be fixed in Archive-Tar.