Skip Menu |

This queue is for tickets about the Module-Install CPAN distribution.

Report information
The Basics
Id: 89030
Status: resolved
Priority: 0/
Queue: Module-Install

People
Owner: Nobody in particular
Requestors: JNWHITLEY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.06
Fixed in: 1.08



Subject: make upgradedeps and make upgradedeps_notest fail with bundled libraries
Hi, I recently ran into an issue with creating a bundle through Module::Install - when running "make upgradedeps" an error is thrown about versions not being numeric. It appears to be caused by a difference between the shape of the contents of the arrays "@modules" and "@installed" in Module::AutoInstall::install. Attached is a patch that appears to fix this for me - it simply creates an array suitable for @modules if $UpgradeDeps is set, and uses this for any/all upgrades. I hope this is of use and helpful.
Subject: Module::AutoInstall.pm.1.06.patch
--- inc/Module/AutoInstall.pm 2013-09-26 08:18:33.669825995 +0100 +++ inc/Module/AutoInstall.pm.fixed 2013-09-26 08:30:28.437255077 +0100 @@ -345,12 +345,15 @@ my $i; # used below to strip leading '-' from config keys my @config = ( map { s/^-// if ++$i; $_ } @{ +shift } ); - my ( @modules, @installed ); + my ( @modules, @installed, @modules_to_upgrade ); while ( my ( $pkg, $ver ) = splice( @_, 0, 2 ) ) { # grep out those already installed if ( _version_cmp( _version_of($pkg), $ver ) >= 0 ) { push @installed, $pkg; + if ( $UpgradeDeps ) { + push @modules_to_upgrade, $pkg, $ver; + } } else { push @modules, $pkg, $ver; @@ -358,8 +361,9 @@ } if ($UpgradeDeps) { - push @modules, @installed; + push @modules, @modules_to_upgrade; @installed = (); + @modules_to_upgrade = (); } return @installed unless @modules; # nothing to do
On Sun Mar 23 17:05:12 2014, bowtie wrote: Show quoted text
As you wish!