Skip Menu |

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 53809
Status: rejected
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: srenner [...] comcast.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.2801
Fixed in: 0.35_07



Subject: Bug in creating tarballs when using Archive::Tar
I had a problem with the tar balls created with Module::Build and tracked it down to the $Archive::Tar::DO_NOT_USE_PREFIX. In 'Module::Build::Base::make_tarball' you have the following code: if ($self->{args}{tar}) { my $tar_flags = $self->verbose ? 'cvf' : 'cf'; $self->do_system($self->split_like_shell($self->{args}{tar}), $tar_flags, "$file.tar", $dir); $self->do_system($self->split_like_shell($self->{args} {gzip}), "$file.tar") if $self->{args}{gzip}; } else { require Archive::Tar; # Archive::Tar versions >= 1.09 use the following to enable a compatibility # hack so that the resulting archive is compatible with older clients. $Archive::Tar::DO_NOT_USE_PREFIX = 0; # **THIS SHOULD BE 1** my $files = $self->rscan_dir($dir); Archive::Tar->create_archive("$file.tar.gz", 1, @$files); } The code comment states that you are setting DO_NOT_USE_PREFIX to enable compatibility with older clients, but to enable compatibility you must set DO_NOT_USE_PREFIX to 1, as stated in the Archive::Tar documentation. The default value for DO_NOT_USE_PREFIX is 0, which means that Module::Build creates tar balls that ARE NOT COMPATIBLE with older tar clients AND WinZip. In WinZip, no paths are seen for any of the files, and so the distribution cannot be installed. Here is a link I found on this, and how I tracked this down to a problem with Archive::Tar. http://www.perlmonks.org/?node_id=627736 Scott
Duplicate of #50571, which was fixed in 0.35_07 in Nov, 2009. The relevant section of code is now as follows: # Archive::Tar versions >= 1.09 use the following to enable a compatibility # hack so that the resulting archive is compatible with older clients. # If no file path is 100 chars or longer, we disable the prefix field # for maximum compatibility. If there are any long file paths then we # need the prefix field after all. $Archive::Tar::DO_NOT_USE_PREFIX = (grep { length($_) >= 100 } @$files) ? 0 : 1;