[KWILLIAMS - Tue Oct 28 08:46:13 2003]:
Show quoted text> Not sure what you mean, "no directory structure." Does it have
> anything at all in the
> tarball?
>
> Note that Module::Build is already at version 0.21, soon to be 0.22.
> See whether this
> has been fixed in the new version. Also, try upgrading Archive::Tar
> to see whether that
> fixes it.
>
> -Ken
Hi Ken,
here is a more indepth desc of my problem.
line 1706 in Base.pm attemps to create a tarball using Archive::Tar
like so:
Archive::Tar->create_archive("$dir.tar.gz", 1, @$files);
the files array contains various directories which all generate an
error like so:
Unable to add file: 'MyDir/lib' at :\Perl\site\lib/Module/Build/Base.pm
line 1706
the tar file is created and seems ok. If I extra using gzip and tar
like so:
gzip -cd MyModule.tar.gz | tar xvf -
the directory structures are built as normal, but If I open the tarball
using Winzip it is unable to parse the path info and it will extra all
the files into the same directory.
if I create the tarball using cygwins GNU tar like so:
tar -vczf MyModule.tar.gz MyModule
the tarball now becomes compatitable with Winzip.
This problem is obviously to do with Archive::Tar implementation -
although I can't find any known bugs on the issue.
I know this is a small thing, but when other people (Windows users)
come to installing my module, they run into problems.
I have hacked your code to fix it for myself replacing line 1706 with
the following:
# my $tarcmd = sprintf("tar -vczf %s.tar.gz %s\n", $dir, $dir);
# printf "creating tarball %s.tar.gz\n%s", $dir, $tarcmd;
# my $pid = open(PTAR, "$tarcmd 2>&1 |");
# my $stdout = do { local $/, <PTAR> }; # init slurp mode
# close(PTAR);
# if ($stdout =~ /error/i) {
# die "===>\n$stdout\n===>";
# }
If this is a bug, maybe you could add a build time option so the use of
Archive::Tar can be overridden e.g.
perl Makefile.PL TAR=C:\cygwin\bin\tar.exe
Regards,
Ben.