Skip Menu |

This queue is for tickets about the CPANPLUS CPAN distribution.

Report information
The Basics
Id: 73310
Status: resolved
Worked: 2.2 hours (130 min)
Priority: 0/
Queue: CPANPLUS

People
Owner: BINGOS [...] cpan.org
Requestors: melezhik [...] gmail.com
Cc:
AdminCc:

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



Subject: behaviour on missed deps
Date: Fri, 16 Dec 2011 12:14:01 +0400
To: bug-cpanplus [...] rt.cpan.org
From: "Alexey Melezhik" <melezhik [...] gmail.com>
Hi Jos! I like you module ((: but ... When installing module and missing dependencies are found, it'd be good if it'd fail in installing. The current behavior it only prints an error message. At least user may want to setup a certain kind of behavior via configuration. Show quoted text
PS> sorry for duplication this issue on github -
https://github.com/jib/cpanplus-devel/issues/3 I am just not sure which is the best place to report suggestions, so using both ((: -- Alexey Melezhik
Subject: Re: [rt.cpan.org #73310] behaviour on missed deps
Date: Fri, 16 Dec 2011 10:16:56 +0000
To: Alexey Melezhik via RT <bug-CPANPLUS [...] rt.cpan.org>
From: "Chris 'BinGOs' Williams" <chris [...] bingosnet.co.uk>
On Fri, Dec 16, 2011 at 03:14:13AM -0500, Alexey Melezhik via RT wrote: Show quoted text
> > Hi Jos! > I like you module ((: but ... > > When installing module and missing dependencies are found, it'd be good if > it'd fail in installing. > The current behavior it only prints an error message. At least user may > want to setup a certain kind of > behavior via configuration. > >
I had spotted the github issue, just hadn't had time to reply. It shouldn't be installing if there were unsatisfied prereqs. Can you give an example of it behaving in this manner, preferably with verbosity switched on in your configuration, 's conf verbose 1', please ? Many thanks in advance, -- Chris Williams aka BinGOs PGP ID 0x4658671F http://www.gumbynet.org.uk ==========================
Download (untitled)
application/pgp-signature 189b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #73310] behaviour on missed deps
Date: Fri, 16 Dec 2011 15:23:00 +0400
To: bug-CPANPLUS [...] rt.cpan.org
From: "Alexey Melezhik" <melezhik [...] gmail.com>
chris@bingosnet.co.uk via RT <bug-CPANPLUS@rt.cpan.org> писал(а) в своём письме Fri, 16 Dec 2011 14:17:10 +0400: Show quoted text
> I had spotted the github issue, just hadn't had time to reply. > > It shouldn't be installing if there were unsatisfied prereqs. > > Can you give an example of it behaving in this manner, > preferably with verbosity switched on in your configuration, > 's conf verbose 1', please ? > > Many thanks in advance, >
I have tested on my custom sources module : CPAN Terminal> ls AZ::BAZ Details for 'AZ::BAZ' Author CPANPLUS Internals (cpanplus-info@lists.sf.net) Description Custom source from 'http://cpan.webdev.x/ADRIVER' Development Stage Unknown Installed File /tmp/lib/perl5/AZ/BAZ.pm Interface Style Unknown Language Used Unknown Package AZ-BAZ-v0.17.0.tar.gz Public License Unknown Support Level Unknown Version Installed 0.10.0 Version on CPAN v0.17.0 --------- CPAN Terminal> i AZ::BAZ Installing AZ::BAZ (v0.17.0) [MSG] Extracted 'AZ-BAZ-v0.17.0' [MSG] Extracted 'AZ-BAZ-v0.17.0/AZ-Foo-v0.0.2.tar.gz' [MSG] Extracted 'AZ-BAZ-v0.17.0/README' [MSG] Extracted 'AZ-BAZ-v0.17.0/svn.ignore' [MSG] Extracted 'AZ-BAZ-v0.17.0/Build.PL' [MSG] Extracted 'AZ-BAZ-v0.17.0/MANIFEST.SKIP' [MSG] Extracted 'AZ-BAZ-v0.17.0/foo.pl' [MSG] Extracted 'AZ-BAZ-v0.17.0/AZ-Foo-v0.0.1.tar.gz' [MSG] Extracted 'AZ-BAZ-v0.17.0/META.yml' [MSG] Extracted 'AZ-BAZ-v0.17.0/AZ-Foo-v0.0.3.tar.gz' [MSG] Extracted 'AZ-BAZ-v0.17.0/META.json' [MSG] Extracted 'AZ-BAZ-v0.17.0/MANIFEST' [MSG] Extracted 'AZ-BAZ-v0.17.0/t' [MSG] Extracted 'AZ-BAZ-v0.17.0/t/00.t' [MSG] Extracted 'AZ-BAZ-v0.17.0/foo' [MSG] Extracted 'AZ-BAZ-v0.17.0/foo/Bar.dat' [MSG] Extracted 'AZ-BAZ-v0.17.0/lib' [MSG] Extracted 'AZ-BAZ-v0.17.0/lib/Foo.pm' [MSG] Extracted 'AZ-BAZ-v0.17.0/lib/AZ' [MSG] Extracted 'AZ-BAZ-v0.17.0/lib/AZ/BAZ.pm' [MSG] Extracted 'AZ-BAZ-v0.17.0/scripts' [MSG] Extracted 'AZ-BAZ-v0.17.0/scripts/foo.pl' [MSG] Extracted 'AZ::BAZ' to '/home/melezhik/.cpanplus/5.8.9/build/AZ-BAZ-v0.17.0' Running [/var/calculate/usr/local/bin/perl -e use strict; BEGIN { my $old = select STDERR; $|++; select $old; $|++; $0 = shift(@ARGV); my $rv = do($0); die $@ if $@; } /home/melezhik/.cpanplus/5.8.9/build/AZ-BAZ-v0.17.0/Build.PL]... Checking whether your kit is complete... Looks good Checking prerequisites... requires: ! Unexisted::Module is not installed ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions of the modules indicated above before proceeding with this installation Deleting MYMETA.yml Removed previous 'MYMETA.yml' Deleting MYMETA.json Removed previous 'MYMETA.json' Created MYMETA.yml and MYMETA.json Deleting Build Removed previous script 'Build' Creating new 'Build' script for 'AZ-BAZ' version 'v0.17.0' [ERROR] No such module 'Unexisted::Module' found on CPAN Running [/var/calculate/usr/local/bin/perl -e use strict; BEGIN { my $old = select STDERR; $|++; select $old; $|++; $0 = shift(@ARGV); my $rv = do($0); die $@ if $@; } /home/melezhik/.cpanplus/5.8.9/build/AZ-BAZ-v0.17.0/Build]... Building AZ-BAZ Running [/var/calculate/usr/local/bin/perl -e use strict; BEGIN { my $old = select STDERR; $|++; select $old; $|++; $0 = shift(@ARGV); my $rv = do($0); die $@ if $@; } /home/melezhik/.cpanplus/5.8.9/build/AZ-BAZ-v0.17.0/Build test]... t/00.t .. ok 1 - here we begin 1..1 ok All tests successful. Files=1, Tests=1, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.04 cusr 0.01 csys = 0.09 CPU) Result: PASS Running [/var/calculate/usr/local/bin/perl -e use strict; BEGIN { my $old = select STDERR; $|++; select $old; $|++; $0 = shift(@ARGV); my $rv = do($0); die $@ if $@; } /home/melezhik/.cpanplus/5.8.9/build/AZ-BAZ-v0.17.0/Build install]... Building AZ-BAZ Skipping /tmp/data/Bar.dat (unchanged) Skipping /tmp/lib/perl5/Foo.pm (unchanged) Installing /tmp/lib/perl5/AZ/BAZ.pm Installing /tmp/man/man3/AZ::BAZ.3 Skipping /tmp/bin/foo.pl (unchanged) Writing /tmp/lib/perl5/x86_64-linux-thread-multi/auto/AZ/BAZ/.packlist *** Install log written to: /home/melezhik/.cpanplus/install-logs/AZ-BAZ-v0.17.0-1324034309.log Module 'AZ::BAZ' installed successfully No errors installing all modules ------------- CPAN Terminal> ls AZ::BAZ Details for 'AZ::BAZ' Author CPANPLUS Internals (cpanplus-info@lists.sf.net) Description Custom source from 'http://cpan.webdev.x/ADRIVER' Development Stage Unknown Installed File /tmp/lib/perl5/AZ/BAZ.pm Interface Style Unknown Language Used Unknown Package AZ-BAZ-v0.17.0.tar.gz Public License Unknown Support Level Unknown Version Installed 0.17.0 Version on CPAN v0.17.0 installed successfully No errors installing all modules --- CPAN Terminal> z AZ::BAZ cat Build.PL #!/usr/bin/perl use Module::Build; use strict; my $build = Module::Build->new( module_name => "AZ::BAZ", dist_author => 'Alexey Melezhik / melezhik@gmail.com', license => 'perl', configure_requires => { 'Module::Build' => '0' }, requires => { 'version' => '0', 'Test::More' => '0', 'Unexisted::Module' => '0' }, script_files => ['scripts/foo.pl'], dat_files => {'foo/Bar.dat' => 'dat/Bar.dat'}, dist_abstract => 'test cpan module', install_base => '/usr/local/rle/', ); $build->add_build_element('dat'); $build->install_path(dat => $build->install_base . "/data"); $build->create_build_script(); -- Alexey Melezhik
I have upgraded cpanplus tp v.0.9113 and have the same behavior but with a little bit differ output: MSG] [Mon Dec 19 13:13:16 2011] Trying to get 'http://cpan.webdev.x/ ADRIVER/AZ-BAZ-v0.17.0.tar.gz' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/svn.ignore' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/META.yml' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/ perlbuild.err' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/distmeta.err' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/MANIFEST' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/ MANIFEST.SKIP' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/Build.PLT' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/README' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/Build.PL' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/manifest.err' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/t' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/t/00.t' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/scripts' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/scripts/ foo.pl' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/lib' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/lib/Foo.pm' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/lib/AZ' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/lib/AZ/ BAZ.pm' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/foo' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ-BAZ-v0.17.0/foo/Bar.dat' [MSG] [Mon Dec 19 13:13:17 2011] Extracted 'AZ::BAZ' to '/ root/.cpanplus/5.8.9/build/AZ-BAZ-v0.17.0' [MSG] [Mon Dec 19 13:13:17 2011] Checking prerequisites... requires: ! Unexisted::Module is not installed ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions of the modules indicated above before proceeding with this installation Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'AZ-BAZ' version 'v0.17.0' [MSG] [Mon Dec 19 13:13:17 2011] DEFAULT 'filter_prereqs' HANDLER RETURNING 'sub return value' [ERROR] [Mon Dec 19 13:13:17 2011] No such module 'Unexisted::Module' found on CPAN [MSG] [Mon Dec 19 13:13:17 2011] Building AZ-BAZ [MSG] [Mon Dec 19 13:13:18 2011] MAKE TEST passed: t/00.t .. ok All tests successful. Files=1, Tests=1, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.03 cusr 0.01 csys = 0.08 CPU) Result: PASS [MSG] [Mon Dec 19 13:13:18 2011] Building AZ-BAZ Installing /usr/local/rle/lib/perl5/AZ/BAZ.pm Installing /usr/local/rle/man/man3/AZ::BAZ.3 --- [MSG] [Mon Dec 19 13:13:17 2011] DEFAULT 'filter_prereqs' HANDLER RETURNING 'sub return value' --- is suspicious, isn't it?
Subject: Re: [rt.cpan.org #73310] behaviour on missed deps
Date: Mon, 19 Dec 2011 13:29:02 +0000
To: Alexey Melezhik via RT <bug-CPANPLUS [...] rt.cpan.org>
From: "Chris 'BinGOs' Williams" <chris [...] bingosnet.co.uk>
On Mon, Dec 19, 2011 at 04:21:44AM -0500, Alexey Melezhik via RT wrote: Show quoted text
> > [MSG] [Mon Dec 19 13:13:17 2011] DEFAULT 'filter_prereqs' HANDLER > RETURNING 'sub return value' --- is suspicious, isn't it? >
It isn't suspicious, its what you get if a 'filter_prereqs' handler hasn't been added. https://metacpan.org/module/CPANPLUS::Internals#bool-internals-_register_callback-name-CALLBACK_NAME-code-CODEREF- In answer to the original question of this ticket, In the case where a distribution specifies a prereq that can't be resolved, what I believe usually occurs is that the testsuite would usually fail as it would require the unresolvable prereq. As the testsuite fails the distribution would not proceed to the install phase. I believe I could make it fail earlier if any prereq couldn't be resolved. -- Chris Williams aka BinGOs PGP ID 0x4658671F http://www.gumbynet.org.uk ==========================
Download (untitled)
application/pgp-signature 189b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #73310] behaviour on missed deps
Date: Mon, 19 Dec 2011 17:42:20 +0400
To: bug-CPANPLUS [...] rt.cpan.org
From: "Alexey Melezhik" <melezhik [...] gmail.com>
chris@bingosnet.co.uk via RT <bug-CPANPLUS@rt.cpan.org> писал(а) в своём письме Mon, 19 Dec 2011 17:29:15 +0400: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=73310 > > > On Mon, Dec 19, 2011 at 04:21:44AM -0500, Alexey Melezhik via RT wrote:
>> >> [MSG] [Mon Dec 19 13:13:17 2011] DEFAULT 'filter_prereqs' HANDLER >> RETURNING 'sub return value' --- is suspicious, isn't it? >>
> > It isn't suspicious, its what you get if a 'filter_prereqs' handler > hasn't been > added. > > https://metacpan.org/module/CPANPLUS::Internals#bool-internals-_register_callback-name-CALLBACK_NAME-code-CODEREF- > > In answer to the original question of this ticket, > > In the case where a distribution specifies a prereq that can't be > resolved, what I believe usually > occurs is that the testsuite would usually fail as it would require the > unresolvable prereq. As the
Yes, but in real life not all developers even don't write a tests, neither writing to test to cover dependencies issues ... Show quoted text
> testsuite fails the distribution would not proceed to the install phase. > > I believe I could make it fail earlier if any prereq couldn't be > resolved. >
So, would you a agree to add this behavior - if any of dependency is missed, than build and test process should continue, but in the end install process should fail with corresponding message (because not all dependencies are met)? -- for example cpan client do so. And also, on my opinion, installing modules without installing all it's dependencies even dangerous and potentially harmful than not installing module at all, runtime errors caused by missed dependencies are painful to fix. -- Alexey Melezhik
Changes for 0.9115 Tue Dec 20 21:10:24 2011 ================================================ * Added new config option 'allow_unknown_prereqs' to resolve issues with 0.9114 release Changes for 0.9114 Mon Dec 19 21:15:38 2011 ================================================ * Fail earlier on unresolvable prereqs as per [rt.cpan.org #73310] The changes I made in 0.9114 broke things in blead for some people so I rolled back and compromised in 0.9115 with a config option 'allow_unknown_prereqs'. Many thanks.
Subject: Re: [rt.cpan.org #73310] behaviour on missed deps
Date: Thu, 12 Jan 2012 13:19:35 +0400
To: bug-CPANPLUS [...] rt.cpan.org
From: Alexey Melezhik <melezhik [...] gmail.com>
Ok, I think it's right compromise 2012/1/12 BINGOS via RT <bug-CPANPLUS@rt.cpan.org>: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=73310 > > > Changes for 0.9115      Tue Dec 20 21:10:24 2011 > ================================================ > * Added new config option 'allow_unknown_prereqs' >  to resolve issues with 0.9114 release > > Changes for 0.9114      Mon Dec 19 21:15:38 2011 > ================================================ > * Fail earlier on unresolvable prereqs as per >  [rt.cpan.org #73310] > > The changes I made in 0.9114 broke things in blead for some > people so I rolled back and compromised in 0.9115 with a > config option 'allow_unknown_prereqs'. > > Many thanks.
Subject: Re: [rt.cpan.org #73310] behaviour on missed deps
Date: Thu, 12 Jan 2012 14:01:37 +0400
To: bug-CPANPLUS [...] rt.cpan.org
From: Alexey Melezhik <melezhik [...] gmail.com>
thank you, again, works okay. tested on my test module: CPAN Terminal> i AZ::BAZ [MSG] Checking if source files are up to date [MSG] Updating sources from 'http://melezhik.x:3000/melezhik' [MSG] Index file saved to '/root/.cpanplus/custom-sources/http%3A%2F%2Fmelezhik.x%3A3000%2Fmelezhik' [MSG] Adding packages from custom source 'http://melezhik.x:3000/melezhik' Installing AZ::BAZ (v0.17.0) [MSG] Extracted 'AZ-BAZ-v0.17.0' [MSG] Extracted 'AZ-BAZ-v0.17.0/MANIFEST.SKIP' [MSG] Extracted 'AZ-BAZ-v0.17.0/META.yml' [MSG] Extracted 'AZ-BAZ-v0.17.0/README' [MSG] Extracted 'AZ-BAZ-v0.17.0/svn.ignore' [MSG] Extracted 'AZ-BAZ-v0.17.0/META.json' [MSG] Extracted 'AZ-BAZ-v0.17.0/Build.PL' [MSG] Extracted 'AZ-BAZ-v0.17.0/MANIFEST' [MSG] Extracted 'AZ-BAZ-v0.17.0/t' [MSG] Extracted 'AZ-BAZ-v0.17.0/t/00.t' [MSG] Extracted 'AZ-BAZ-v0.17.0/scripts' [MSG] Extracted 'AZ-BAZ-v0.17.0/scripts/foo.pl' [MSG] Extracted 'AZ-BAZ-v0.17.0/lib' [MSG] Extracted 'AZ-BAZ-v0.17.0/lib/Foo.pm' [MSG] Extracted 'AZ-BAZ-v0.17.0/lib/AZ' [MSG] Extracted 'AZ-BAZ-v0.17.0/lib/AZ/BAZ.pm' [MSG] Extracted 'AZ-BAZ-v0.17.0/foo' [MSG] Extracted 'AZ-BAZ-v0.17.0/foo/Bar.dat' [MSG] Extracted 'AZ::BAZ' to '/root/.cpanplus/5.12.4/build/AZ-BAZ-v0.17.0' Running [/usr/bin/perl -e use strict; BEGIN { my $old = select STDERR; $|++; select $old; $|++; $0 = shift(@ARGV); my $rv = do($0); die $@ if $@; } /root/.cpanplus/5.12.4/build/AZ-BAZ-v0.17.0/Build.PL --installdirs site]... Checking prerequisites... requires: ! Unexisted::Module is not installed ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions of the modules indicated above before proceeding with this installation Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'AZ-BAZ' version 'v0.17.0' [ERROR] No such module 'Unexisted::Module' found on CPAN [ERROR] Unable to satisfy prerequisites for 'AZ::BAZ' -- aborting install [ERROR] Unable to create a new distribution object for 'AZ::BAZ' -- cannot continue *** Install log written to: /root/.cpanplus/install-logs/AZ-BAZ-v0.17.0-1326362446.log Error installing 'AZ::BAZ' Problem installing one or more modules 2012/1/12 Alexey Melezhik <melezhik@gmail.com>: Show quoted text
> Ok, I think it's right compromise > > 2012/1/12 BINGOS via RT <bug-CPANPLUS@rt.cpan.org>:
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=73310 > >> >> Changes for 0.9115      Tue Dec 20 21:10:24 2011 >> ================================================ >> * Added new config option 'allow_unknown_prereqs' >>  to resolve issues with 0.9114 release >> >> Changes for 0.9114      Mon Dec 19 21:15:38 2011 >> ================================================ >> * Fail earlier on unresolvable prereqs as per >>  [rt.cpan.org #73310] >> >> The changes I made in 0.9114 broke things in blead for some >> people so I rolled back and compromised in 0.9115 with a >> config option 'allow_unknown_prereqs'. >> >> Many thanks.
Cool. Closing the ticket again.