Skip Menu |
 

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

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

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

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



Subject: Cannot find bundle source for modules that contain sub-modules
Download (untitled) / with headers
text/plain 354b
Using Module::Install::Bundle, I have not managed to bundle modules that have several sub-modules. For example, the distribution for the module Error contains: Error, Error::Simple, Error::WarnDie and Error::subs. Bundling the Error module fails because an attempt to download a distribution called Error::Simple (which does not exist) is made and fails.
Subject: log2.txt
Download log2.txt
text/plain 3.5k
$ perl Makefile_test_2.PL include /home/floflooo/Work/GAAS/program/GAAS/inc/Module/Install.pm include inc/Module/Install/Metadata.pm include inc/Module/Install/Base.pm Requiring a module that contains several *.pm files include inc/Module/Install/Bundle.pm skipped List::Util (needs shared library) [MSG] Trying to get 'ftp://ftp.cpan.org/pub/CPAN/authors/id/S/SH/SHLOMIF/Error-0.17016.tar.gz' Fetch failed! HTTP response: 404 Not Found [404 Can't chdir to authors] at /usr/share/perl/5.10/CPANPLUS/Internals/Fetch.pm line 396 Could not fetch '/pub/CPAN/authors/id/S/SH/SHLOMIF/Error-0.17016.tar.gz' from 'ftp.cpan.org' at /usr/share/perl/5.10/CPANPLUS/Internals/Fetch.pm line 396 Command failed: at /usr/share/perl/5.10/CPANPLUS/Internals/Fetch.pm line 396 Command failed: at /usr/share/perl/5.10/CPANPLUS/Internals/Fetch.pm line 396 Command failed: get: Access failed: 550 /pub/CPAN/authors/id/S/SH/SHLOMIF/Error-0.17016.tar.gz: No such file or directory. at /usr/share/perl/5.10/CPANPLUS/Internals/Fetch.pm line 396 [ERROR] Fetching of 'ftp://ftp.cpan.org/pub/CPAN/authors/id/S/SH/SHLOMIF/Error-0.17016.tar.gz' failed: Command failed: get: Access failed: 550 /pub/CPAN/authors/id/S/SH/SHLOMIF/Error-0.17016.tar.gz: No such file or directory. [MSG] Trying to get 'http://www.cpan.org/authors/id/S/SH/SHLOMIF/Error-0.17016.tar.gz' [MSG] Extracted 'Error-0.17016' [MSG] Extracted 'Error-0.17016/MANIFEST' [MSG] Extracted 'Error-0.17016/META.yml' [MSG] Extracted 'Error-0.17016/ChangeLog' [MSG] Extracted 'Error-0.17016/README' [MSG] Extracted 'Error-0.17016/Makefile.PL' [MSG] Extracted 'Error-0.17016/Build.PL' [MSG] Extracted 'Error-0.17016/lib' [MSG] Extracted 'Error-0.17016/lib/Error.pm' [MSG] Extracted 'Error-0.17016/lib/Error' [MSG] Extracted 'Error-0.17016/lib/Error/Simple.pm' [MSG] Extracted 'Error-0.17016/examples' [MSG] Extracted 'Error-0.17016/examples/warndie.pl' [MSG] Extracted 'Error-0.17016/examples/example.pl' [MSG] Extracted 'Error-0.17016/examples/next-in-loop' [MSG] Extracted 'Error-0.17016/examples/next-in-loop/Error.pm-eval.pl' [MSG] Extracted 'Error-0.17016/examples/next-in-loop/Error.pm-next-out-of-catch.pl' [MSG] Extracted 'Error-0.17016/examples/next-in-loop/Error.pm-next-label.pl' [MSG] Extracted 'Error-0.17016/examples/next-in-loop/README' [MSG] Extracted 'Error-0.17016/examples/next-in-loop/Error.pm-next.pl' [MSG] Extracted 'Error-0.17016/t' [MSG] Extracted 'Error-0.17016/t/09dollar-at.t' [MSG] Extracted 'Error-0.17016/t/07try-in-obj-destructor.t' [MSG] Extracted 'Error-0.17016/t/04use-base-Error-Simple.t' [MSG] Extracted 'Error-0.17016/t/12wrong-error-var.t' [MSG] Extracted 'Error-0.17016/t/11rethrow.t' [MSG] Extracted 'Error-0.17016/t/01throw.t' [MSG] Extracted 'Error-0.17016/t/08warndie.t' [MSG] Extracted 'Error-0.17016/t/10throw-in-catch.t' [MSG] Extracted 'Error-0.17016/t/pod-coverage.t' [MSG] Extracted 'Error-0.17016/t/pod.t' [MSG] Extracted 'Error-0.17016/t/03throw-non-Error.t' [MSG] Extracted 'Error-0.17016/t/05text-errors-with-file-handles.t' [MSG] Extracted 'Error-0.17016/t/13except-arg0.t' [MSG] Extracted 'Error-0.17016/t/02order.t' [MSG] Extracted 'Error-0.17016/t/06customize-text-throw.t' [MSG] Extracted 'Error-0.17016/t/lib' [MSG] Extracted 'Error-0.17016/t/lib/MyDie.pm' [MSG] Extracted 'Error-0.17016/inc' [MSG] Extracted 'Error-0.17016/inc/Test' [MSG] Extracted 'Error-0.17016/inc/Test/Run' [MSG] Extracted 'Error-0.17016/inc/Test/Run/Builder.pm' [MSG] Extracted 'Error' to '/home/floflooo/Work/GAAS/program/GAAS/inc/BUNDLES/Error-0.17016' Cannot find bundle source for Error::Simple at /usr/local/share/perl/5.10.1/Module/Install/Bundle.pm line 38.
Subject: Makefile_test_2.PL
Download Makefile_test_2.PL
text/x-perl 212b
use inc::Module::Install; name 'GAAS'; all_from 'lib/GAAS.pm'; build_requires 'Test::More'; print "Requiring a module that contains several *.pm files\n"; requires 'Error'; auto_bundle_deps; WriteAll;
Download (untitled) / with headers
text/plain 223b
The Error module wasn't a very good example because even using the cpan command line tool, I could not find Error::Simple. Template and Template::Base might be better examples. Anyways, here is a patch that fixes the bug!
Subject: Module-Install-Admin-Bundle.diff
--- /home/floflooo/Desktop/Module-Install-0.95/lib/Module/Install/Admin/Bundle.pm 2010-03-11 01:41:24.000000000 +1000 +++ /usr/local/share/perl/5.10.1/Module/Install/Admin/Bundle.pm 2010-04-11 02:40:28.063856331 +1000 @@ -55,11 +55,17 @@ unlink $file; next unless ($extract_result); + + my $location = ''; if ($extract_result =~ /$bundle_dir\/(.*)/) { - $bundles{$name} = 'inc/BUNDLES/'.$1; + $location = 'inc/BUNDLES/'.$1; } else { - $bundles{$name} = $extract_result; + $location = $extract_result; + } + for my $submod ($mod->contains) { + $bundles{$submod->name} = $location; } + $self->{already_bundled}{ $mod->package }++; }
Subject: Module-Install-Bundle.diff
--- /home/floflooo/Desktop/Module-Install-0.95/lib/Module/Install/Bundle.pm 2010-03-11 01:41:24.000000000 +1000 +++ /usr/local/share/perl/5.10.1/Module/Install/Bundle.pm 2010-04-11 02:45:10.853856180 +1000 @@ -35,7 +35,12 @@ while (my ($name, $version) = splice(@_, 0, 2)) { $version ||= 0; - my $source = $bundles->{$name} or die "Cannot find bundle source for $name"; + my $source = $bundles->{$name}; + if (not $source) { + warn "Warning: Could not find package for module $name. Bundle it manually\n"; + next; + } + my $target = File::Basename::basename($source); $self->bundles($name, $target);
Another small patch
Subject: Module-Install-Admin-ScanDeps.diff
--- /home/floflooo/Desktop/ScanDeps.pm 2010-04-11 04:05:47.000000000 +1000 +++ /usr/local/share/perl/5.10.1/Module/Install/Admin/ScanDeps.pm 2010-04-11 04:07:08.931371199 +1000 @@ -29,7 +29,7 @@ return if $min_version <= $perl_version; } - my @files = scalar $self->admin->find_in_inc($pkg) + my @files = $self->admin->find_in_inc($pkg) or die "Cannot find $pkg in \@INC"; my %result = ($pkg => $files[0]);
Download (untitled) / with headers
text/plain 576b
Hi. Applied your patches in the trunk, though the last one for ::ScanDeps is rejected (noted the reason in the source). Will be fixed in the next release. Thanks. On 2010-4-10 Sat 07:54:56, FANGLY wrote: Show quoted text
> Using Module::Install::Bundle, I have not managed to bundle modules
that Show quoted text
> have several sub-modules. For example, the distribution for the module > Error contains: Error, Error::Simple, Error::WarnDie and Error::subs. > Bundling the Error module fails because an attempt to download > a distribution called Error::Simple (which does not exist) is made and > fails.
Download (untitled) / with headers
text/plain 164b
Thanks for the great work Kenichi! See https://rt.cpan.org/Ticket/Display.html?id=56474&results=f11eea6ef1ad507c43f92d6c98a1f28f for the reason to my last patch.
Hi. Closed this ticket as fixed, too. Thanks.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.