Skip Menu |

This queue is for tickets about the CPAN-Mini-Inject CPAN distribution.

Report information
The Basics
Id: 78056
Status: open
Priority: 0/
Queue: CPAN-Mini-Inject

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

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



Subject: Removing module from distribution breaks inject (if old distribution removed)
With 0.31, 'modulelist' contains entries for each module in a distribution, not just the package itself. We remove previous package versions from the local repository, but this now causes problems when a file is removed, since the line is now removed from modulelist (it doesn't appear in the regex, line 344) and 'inject' will attempt to find the earlier package version. Not sure what the best action is - CPAN::Mini::Inject is doing the right thing in terms of CPAN behaviour, but since the module exists to force people's own code into a CPAN mirror it might need to be more flexible? The 'remove' option suggested (#76546) could fix this (we would remove before adding the new distribution). Thanks, Michael
On Tue Jun 26 09:42:13 2012, mjemmeson wrote: Show quoted text
> With 0.31, 'modulelist' contains entries for each module in a > distribution, not just the package > itself.
After closer examination of CPAN::Mini::Inject, it looks like the Dist::Metadata behaviour is erroneous anyway - it's going to repeatedly copy the same distribution several times for a package (line 415). Checking that $version is not 0 would sort this, e.g. --- a 2012-06-26 16:19:37.000000000 +0100 +++ b 2012-06-26 16:19:15.000000000 +0100 @@ -404,6 +404,7 @@ my %updatedir; for my $modline ( @{ $self->{modulelist} } ) { my ( $module, $version, $file ) = split( /\s+/, $modline ); + next unless $version; my $target = $self->config->get( 'local' ) . '/authors/id/' . $file; my $source = $self->config->get( 'repository' ) . '/authors/id/' . $file;