develooper Front page | perl.perl5.porters | Postings from June 2009

Re: [PATCH] Update CPANPLUS::Dist::Build to CPAN version 0.34

Thread Previous | Thread Next
From:
Craig A. Berry
Date:
June 24, 2009 20:14
Subject:
Re: [PATCH] Update CPANPLUS::Dist::Build to CPAN version 0.34
Message ID:
c9ab31fc0906242014h3bef5975xb5c871c36e3ca5a6@mail.gmail.com
On Wed, Jun 24, 2009 at 3:54 AM, Chris 'BinGOs'
Williams<chris@bingosnet.co.uk> wrote:
> On Tue, Jun 23, 2009 at 10:03:45PM -0500, Craig A. Berry wrote:


>> $ perl [-.lib.cpanplus.dist.build.t]02_cpanplus-dist-build.t
>> ok 1 - use CPANPLUS::Dist::Build;
>> ok 2 - Format is available
>> ok 3 - Module object created for 'noxs'
>> ok 4 -    Tarball
>> 'D0:[CRAIG.BLEAD.LIB.CPANPLUS.DIST.BUILD.T.src.noxs]Foo-Bar-0.01.tar.gz'
>> exists
>> [MSG] No 'D0:[CRAIG.BLEAD.LIB.CPANPLUS.DIST.BUILD.T.dummy-cpanplus.custom-sources]'
>> dir, skipping custom sources
>> [MSG] No 'D0:[CRAIG.BLEAD.LIB.CPANPLUS.DIST.BUILD.T.dummy-cpanplus.custom-sources]'
>> dir, skipping custom sources
>> [MSG] No 'D0:[CRAIG.BLEAD.LIB.CPANPLUS.DIST.BUILD.T.dummy-cpanplus.custom-sources]'
>> dir, skipping custom sources
>> [ERROR] Build 'prereq_data' failed: invalid argument
>
> I've investigated and think I have found the problem. Other IPC::Cmd calls in the
> module specifically check if they are on VMS and wrap the text argument to Build with
> "". I've done this now for the call out to Build prereq_data as well.
>
> My bad.
>
> Yeah, it is something that gets called in prepare() when resolving prereqs.
>
> Hopefully, all the issues should be resolved by this.
>
> *cross fingers*

Thanks, Chris, but no joy.  I didn't think there would be as
IPC::Cmd::run now does its own argument quoting on VMS.    There's no
harm in the patch, but it doesn't make any difference.  Deep inside
_find_prereqs, I see the following arguments about to be passed to
system():

IPC::Cmd::_system_run(/perl_root/lib/IPC/Cmd.pm:711):
711:        system( ref $cmd ? @$cmd : $cmd ) == 0 or do {
  DB<8> x $cmd
0  ARRAY(0x446ca20)
   0  'alma$dkb200:[craig.blead]ndbgperl.exe;2'
   1  '"D0:[CRAIG.BLEAD.LIB.CPANPLUS.bin]cpanp-run-perl"'
   2  '"D0:[CRAIG.BLEAD.LIB.CPANPLUS.DIST.BUILD.T.dummy-cpanplus.5_11_0.build.Foo-Bar-0_01]Build.com"'
   3  '"prereq_data"'
   4  '"install_base=D0:[CRAIG.BLEAD.LIB.CPANPLUS.DIST.BUILD.T.dummy-perl]"'
  DB<9>

So basically we're running the Perl we just built to execute
cpanp-run-perl which calls C<do> to execute Build.com.  But, unlike
system() or exec(), do() only knows how to run Perl (I think, is that
right?), and Build.com is not exactly a Perl script.  It has one
embedded in it, but it's a DCL procedure, morally equivalent to
Build.bat on Windows.  The value in $? is 1024 after system() returns.
 The "invalid argument" error is spurious and is whatever was already
there before the system() call.  I will dig a bit more tomorrow.  It
wouldn't surprise me if whatever is the real trouble has been there
awhile and has been hiding behind other reasons for failure (sorry not
to drill down sooner).

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About