Skip Menu |

This queue is for tickets about the CPANPLUS CPAN distribution.

Report information
The Basics
Id: 47249
Status: stalled
Priority: 0/
Queue: CPANPLUS

People
Owner: Nobody in particular
Requestors: pmoore6448 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: cpanp fails to find metadata for Errno, which is included with perl-5.10.0
Date: Mon, 22 Jun 2009 14:07:12 -0400
To: bug-cpanplus [...] rt.cpan.org
From: Phillip Moore <pmoore6448 [...] gmail.com>
Using a freshly installed perl-5.10.0 distribution, and trying to use cpanp to install a number of modules, I've found that if you specify at least one module in the core itself, you'll get a bizarre error. Now, I suspect this is an error with the way the metadata is setup for Errno, which is in the core, but no longer available on CPAN independently. if you specify a dependency on Errno in your Makefile.PL, then this will result in an error if you try to use cpanp to install it. ------ root@efs-as5-3$ cpanp CPANPLUS::Shell::Default -- CPAN exploration and module installation (v0.84) *** Please report bugs to <bug-cpanplus@rt.cpan.org>. *** Using CPANPLUS::Backend v0.84. *** ReadLine support available (try 'i Term::ReadLine::Perl'). *** Type 'p' now to show start up log Did you know... You can update CPANPLUS by running: 's selfupdate' CPAN Terminal> s conf verbose 1 Key 'verbose' was set to '1' CPAN Terminal> i Errno [MSG] Checking if source files are up to date [MSG] Retrieving /root/.cpanplus/sourcefiles.2.18.stored [MSG] No '/root/.cpanplus/custom-sources' dir, skipping custom sources [ERROR] 'Errno' does not contain an author part [ERROR] Cannot find 'Errno' in the module tree No such module: Errno No modules found to operate on! Nothing done -------- I doubt it matter, but here's the perl version info: root@efs-as5-3$ perl -V Summary of my perl5 (revision 5 version 10 subversion 0) configuration: Platform: osname=linux, osvers=2.6.18-128.1.6.el5, archname=x86_64-linux-thread-multi uname='linux efs-as5-3 2.6.18-128.1.6.el5 #1 smp tue mar 24 12:05:57 edt 2009 x86_64 x86_64 x86_64 gnulinux ' config_args='-ds -e -Dprefix=/var/efs -Duseithreads -Dcc=gcc' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='4.1.2 20080704 (Red Hat 4.1.2-44)', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64 /usr/local/lib64 libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/libc-2.5.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Built under linux Compiled at Jun 22 2009 13:26:52 @INC: /var/efs/lib/perl5/5.10.0/x86_64-linux-thread-multi /var/efs/lib/perl5/5.10.0 /var/efs/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi /var/efs/lib/perl5/site_perl/5.10.0 .
On Mon Jun 22 14:07:42 2009, pmoore6448@gmail.com wrote: Show quoted text
> Using a freshly installed perl-5.10.0 distribution, and trying to use cpanp > to install a number of modules, I've found that if you specify at least one > module in the core itself, you'll get a bizarre error.
Actually, according to the code you should get an error on screen, but it keeps going: for my $mod ( @prereqs ) { ..... my $modobj = $cb->module_tree($mod); unless( $modobj ) { error( loc( "No such module '%1' found on CPAN", $mod ) ); next; } ..... } Can you show me a tarball that depends on errno that actually fails to install because of it? Show quoted text
> Now, I suspect > this is an error with the way the metadata is setup for Errno, which is in > the core, but no longer available on CPAN independently. if you specify a > dependency on Errno in your Makefile.PL, then this will result in an error > if you try to use cpanp to install it. > > ------ > root@efs-as5-3$ cpanp > CPANPLUS::Shell::Default -- CPAN exploration and module installation (v0.84) > *** Please report bugs to <bug-cpanplus@rt.cpan.org>. > *** Using CPANPLUS::Backend v0.84. > *** ReadLine support available (try 'i Term::ReadLine::Perl'). > > *** Type 'p' now to show start up log > > Did you know... > You can update CPANPLUS by running: 's selfupdate' > CPAN Terminal> s conf verbose 1 > > Key 'verbose' was set to '1' > CPAN Terminal> i Errno > > [MSG] Checking if source files are up to date > [MSG] Retrieving /root/.cpanplus/sourcefiles.2.18.stored > [MSG] No '/root/.cpanplus/custom-sources' dir, skipping custom sources > [ERROR] 'Errno' does not contain an author part > > [ERROR] Cannot find 'Errno' in the module tree > > No such module: Errno > No modules found to operate on! > Nothing done
This still makes sense to me: there's no Errno on the CPAN, it can't install it. That said, it *should not* abort an install of a module that depends on Errno. If you can provide me with an example where it does, I'd be very interested.
Subject: Re: [rt.cpan.org #47249] cpanp fails to find metadata for Errno, which is included with perl-5.10.0
Date: Sat, 27 Jun 2009 11:03:40 -0400
To: bug-CPANPLUS [...] rt.cpan.org
From: Phillip Moore <pmoore6448 [...] gmail.com>
My own code, but it's not exportable yet. Yes, it generates an error "on screen", but that's not useful if you're trying to automate the installation, and want to do robust error checking. The "on screen" statement means you're expecting a human to do the error checking, and that's not amenable to automation. Experimentally, I found that cpanp can't be used directly since it almost never returns a useful error code (that was a separate bug report). What I've been doing to automate the installation is: perl -MCPANPLUS -e 'install shift or die' $module instead of: cpanp i $module and that allows me to trap all the errors. The bottom line is that cpanp was clearly designed to be an interactive tool, and while you CAN use it no-interactively, I'm finding that direct use of CPANPLUS is far more robust, since I can do better error handling. The bigger issue I have (and this is unrelated to the two bug reports I've found, and would really count as a feature enhancement request) is that installing a specific version is impossible, unless you want to wrap cpanp with expect. Since you have to first search for a module, and then give the index into the search result, batch installation of a specific version isn't possible (unless there's a trick I haven't found yet). The issue is that I need to build and install a fairly long list of CPAN dependencies (>100) in order to test some very complex software, and we want to be able to reproduce the installation. If I use cpanp, and let it pick the latest module published on CPAN, I can get different results day by day, week by week. What we need to to do is specify the versions we're using, and install those explicitly. My approach to this is use the CPAN::* and CPANPLUS::* modules directly, and skip cpanp. For one thing, we have to expand the dependencies/prereqs ourselves, and fix THOSE versions, too. Anyway, some of the problems we're trying to solve are quite possible out of scope for cpanp, and it's intended usage. Sorry if the extra details are a distraction; I hope it provides some context for what we're trying to do. On Sat, Jun 27, 2009 at 9:40 AM, Jos Boumans via RT < bug-CPANPLUS@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=47249 > > > On Mon Jun 22 14:07:42 2009, pmoore6448@gmail.com wrote:
> > Using a freshly installed perl-5.10.0 distribution, and trying to use
> cpanp
> > to install a number of modules, I've found that if you specify at least
> one
> > module in the core itself, you'll get a bizarre error.
> > Actually, according to the code you should get an error on screen, but it > keeps going: > > for my $mod ( @prereqs ) { > ..... > my $modobj = $cb->module_tree($mod); > unless( $modobj ) { > error( loc( "No such module '%1' found on CPAN", $mod ) ); > next; > } > ..... > } > > Can you show me a tarball that depends on errno that actually fails to > install because of it? >
> > Now, I suspect > > this is an error with the way the metadata is setup for Errno, which is
> in
> > the core, but no longer available on CPAN independently. if you specify
> a
> > dependency on Errno in your Makefile.PL, then this will result in an
> error
> > if you try to use cpanp to install it. > > > > ------ > > root@efs-as5-3$ cpanp > > CPANPLUS::Shell::Default -- CPAN exploration and module installation
> (v0.84)
> > *** Please report bugs to <bug-cpanplus@rt.cpan.org>. > > *** Using CPANPLUS::Backend v0.84. > > *** ReadLine support available (try 'i Term::ReadLine::Perl'). > > > > *** Type 'p' now to show start up log > > > > Did you know... > > You can update CPANPLUS by running: 's selfupdate' > > CPAN Terminal> s conf verbose 1 > > > > Key 'verbose' was set to '1' > > CPAN Terminal> i Errno > > > > [MSG] Checking if source files are up to date > > [MSG] Retrieving /root/.cpanplus/sourcefiles.2.18.stored > > [MSG] No '/root/.cpanplus/custom-sources' dir, skipping custom sources > > [ERROR] 'Errno' does not contain an author part > > > > [ERROR] Cannot find 'Errno' in the module tree > > > > No such module: Errno > > No modules found to operate on! > > Nothing done
> > This still makes sense to me: there's no Errno on the CPAN, it can't > install it. That said, it > *should not* abort an install of a module that depends on Errno. > > If you can provide me with an example where it does, I'd be very > interested. > > >
Subject: Re: [rt.cpan.org #47249] cpanp fails to find metadata for Errno, which is included with perl-5.10.0
Date: Sat, 27 Jun 2009 17:26:35 +0200
To: bug-CPANPLUS [...] rt.cpan.org
From: "Jos I. Boumans" <jos [...] dwim.org>
On Jun 27, 2009, at 5:04 PM, Phillip Moore via RT wrote: Show quoted text
> Queue: CPANPLUS > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=47249 > > > My own code, but it's not exportable yet. > Yes, it generates an error "on screen", but that's not useful if > you're trying to automate the installation, and want to do robust > error checking.
This is arguing semantics -- the return values are indicative of success and failure, this is just a diagnostic. [Not Really Fatal Error, But Maybe You Want To Look Into This] Could not find Errno Show quoted text
> Experimentally, I found that cpanp can't be used directly since it > almost never returns a useful error code (that was a separate bug > report). What I've been doing to automate > the installation is: > > perl -MCPANPLUS -e 'install shift or die' $module > > instead of: > > cpanp i $module > > and that allows me to trap all the errors. The bottom line is > that cpanp > was clearly designed to be an interactive tool, and while you CAN > use it > no-interactively, I'm finding that direct use of CPANPLUS is far more > robust, since I can do better error handling.
Well yes, it's the API. Incidentally, your other request to have cpanp exit with an error code has been resolved and released with 0.87_03. Show quoted text
> The bigger issue I have (and this is unrelated to the two bug > reports I've > found, and would really count as a feature enhancement request) is > that > installing a specific version is impossible, unless you want to > wrap cpanp > with expect. Since you have to first search for a module, and > then give > the index into the search result, batch installation of a specific > version > isn't possible (unless there's a trick I haven't found yet).
Of course there is. Whatever you feed to the shell's i or t, etc is handed to CPANPLUS::Backend->parse_module: http://search.cpan.org/~kane/CPANPLUS/lib/CPANPLUS/Backend.pm# $mod_obj_=_$cb-%3Eparse_module(_module_=%3E_$modname|$distname| $modobj|URI|PATH_) You can feed it just about anything, including URLs, older versions, tarballs, local paths, etc. If you want to browse through releases from the shell, you want: CPAN Terminal> f DBI And you can pick from just about every DBI released. Show quoted text
> The issue is that I need to build and install a fairly long list of > CPAN > dependencies (>100) in order to test some very complex software, > and we want > to be able to reproduce the installation. If I use cpanp, and let > it pick > the latest module published on CPAN, I can get different results > day by day, > week by week. What we need to to do is specify the versions we're > using, > and install those explicitly. My approach to this is use the > CPAN::* and > CPANPLUS::* modules directly, and skip cpanp. For one thing, we > have to > expand the dependencies/prereqs ourselves, and fix THOSE versions, > too.
Yeah, you should be using the API for such complex things. Have you considered using custom sources: http://search.cpan.org/~kane/CPANPLUS/lib/CPANPLUS/ Backend.pm#CUSTOM_MODULE_SOURCES Or perhaps injecting them directly in your local CPAN mirror: http://search.cpan.org/~andya/CPAN-Mini-Inject-0.26/lib/CPAN/Mini/ Inject.pm If you want to override what versions are being installed, you can hook into the resolving stage of cpanplus. This is somewhat more adventurous: http://search.cpan.org/~kane/CPANPLUS-0.8601/lib/CPANPLUS/Dist.pm# $bool_=_$dist-%3Eprereq_satisfied(_modobj_=%3E_$modobj,_version_=%3E_ $version_spec_) If you want to have *complete* control over what happens during installation, define your own C::Dist::* class: http://search.cpan.org/~kane/CPANPLUS-0.8601/lib/CPANPLUS/Dist/ Base.pm This is what CPANPLUS::YACSmoke does for smoking purposes: http://search.cpan.org/~bingos/CPANPLUS-YACSmoke-0.42/lib/CPANPLUS/ Dist/YACSmoke.pm Show quoted text
> Anyway, some of the problems we're trying to solve are quite > possible out of > scope for cpanp, and it's intended usage. Sorry if the extra > details are a > distraction; I hope it provides some context for what we're trying > to do.
Much appreciated. And no, all this stuff is completely possible. Cheers, -- Jos Boumans 'Real programmers use "cat > a.out"'