Subject: | Fwd: Suggested fix for an archive processing problem I ran into w/Shipwright |
Date: | Wed, 23 Oct 2013 20:25:39 -0400 |
To: | bug-Shipwright [...] rt.cpan.org |
From: | Matt Magri <mmagri [...] akamai.com> |
I just ran into this again for XML::SAX::Expat, and when I looked for
this email I realized I hadn't sent it to the bugs address at the time. :/
Here it is now. :)
Matt
Show quoted text
-------- Original Message --------
Subject: Suggested fix for an archive processing problem I ran into
w/Shipwright
Date: Thu, 21 Mar 2013 19:36:44 -0400
From: Matt Magri <mmagri@akamai.com>
To: sunnavy@bestpractical.com <sunnavy@bestpractical.com>
While "call-shipwright import Net::SFTP" was processing dependencies, I
ran into this...
Fetching with LWP:
http://search.cpan.org/CPAN/authors/id/M/MI/MITHALDU/Crypt-DH-0.07.tar.gz
Caught Deep Recursion Condition: /tmp/shipwright_source_Yt6RqD contains
/tmp/shipwright_source_Yt6RqD/cpan-Crypt-DH at
/home/mmagri/workspaces/mmagri_build_bigperl/cpan-Shipwright/perl/lib/perl5/Shipwright/Source/Compressed.pm
line 110
can't dump __require.yml: No such file or directory
cannot remove path when cwd is /tmp/shipwright_source_Yt6RqD for
/tmp/shipwright_source_Yt6RqD: at
/home/mmagri/workspaces/mmagri_build_bigperl/perl5.14/export/usr/local/akamai/lib/5.14.2/File/Temp.pm
line 902
Searching a bit I found
http://www.mail-archive.com/catalyst@lists.scsys.co.uk/msg11641.html,
which turned out to be a handy pointer, since it eventually led me to
the Compressed.pm. The PerlImagick fix stripped ./ from the beginning of
base_dir, but the Crypt-DH-0.07.tar.gz archive starts with...
wakanda:foo mmagri$ tar tfzp Crypt-DH-0.07.tar.gz | head
./
./Crypt-DH-0.07/
./Crypt-DH-0.07/Changes
./Crypt-DH-0.07/inc/
./Crypt-DH-0.07/inc/Devel/
./Crypt-DH-0.07/inc/Devel/CheckLib.pm
./Crypt-DH-0.07/inc/Module/
./Crypt-DH-0.07/inc/Module/AutoInstall.pm
./Crypt-DH-0.07/inc/Module/Install/
./Crypt-DH-0.07/inc/Module/Install/AutoInstall.pm
So, my concern was that $base_dir was getting set to '', which might
have led to the eventual failure. I think I kind of confirmed it by
adding a check for "./", like this...
shift @$files if ($files->[0] =~ /^\.[\/\\]/);
my $base_dir = $files->[0];
# some compressed file has name like ./PerlImagick-6.67/
$base_dir =~ s!^\.[/\\]!!;
With that test change in place, the call-shipwright import was able to
complete successfully. I am not familiar enough with the rest of the
shipwright code to say if shifting $files in that call is a bad idea.
Matt
P.S> Thanks for shipwright, btw... it is really helpful!