Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the App-cpanminus CPAN distribution.

Report information
The Basics
Id: 81518
Status: open
Priority: 0/
Queue: App-cpanminus

People
Owner: Nobody in particular
Requestors: chip [...] pobox.com
Cc:
AdminCc:

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



Subject: .meta installation ignores DESTDIR and INSTALLARCHLIB
Some time ago, but I just noticed, ExtUtils::Install is trying to install .meta files in the real target lib dir, even though I've set all the right env vars to ensure that installation goes to a different place for packaging (making a deb). Thus, even after: unset PERL_CPANM_OPT export DESTDIR="$destdir" export PERL_MM_OPT=" INSTALLDIRS=site DESTDIR=$destdir INSTALLARCHLIB=$SITEPREFIX/lib/$arch" export PERL_MB_OPT="--installdirs site --destdir $destdir -- installarchlib $SITEPREFIX/lib/$arch" when I install with cpanm I get .meta (but nothing else) not installed, because of: Installing <debdir>/lib/Net/IP.pm Installing <debdir>/man/man3/Net::IP.3 Appending installation info to <debdir>/lib/x86_64-linux/perllocal.pod -> OK Successfully installed Net-IP-1.26 (upgraded from 1.25) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ERROR: Can't create '<realdir_in_opt>/lib/x86_64-linux/.meta/Net-IP- 1.26' mkdir <realdir_in_opt>/lib/x86_64-linux/.meta/Net-IP-1.26: Permission denied at <realdir_in_opt>/lib/5.14.2/ExtUtils/Install.pm line 494. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! at -e line 1.
I'm pretty sure its cpanminus which is doing that, not ExtUtils::Install.  Moved it into the App-cpanminus queue.

It's this...

      my @cmd = (
          ($self->{sudo} ? 'sudo' : ()),
          $^X,
          '-MExtUtils::Install=install',
          '-e',
          qq[install({ 'blib/meta' => '$base/$Config{archname}/.meta/$dist->{distvname}' })],
      );

cpanm is already scraping INSTALL_BASE out of PERL_MM_OPT to figure out $base.  It would need to do DESTDIR as well.  Another bug there is its not looking for PERL_MB_OPT (--install_base and --destdir) so this will be all wrong with Module::Build.
Subject: Re: [rt.cpan.org #81518] .meta installation ignores DESTDIR and INSTALLARCHLIB
Date: Sat, 29 Dec 2012 12:18:08 -0800
To: bug-App-cpanminus [...] rt.cpan.org
From: Tatsuhiko Miyagawa <miyagawa [...] gmail.com>
Hi, To understand the problem correctly, could you describe how to reproduce the bug (also, what to expect and what you see instead) on https://github.com/miyagawa/cpanminus/issues ? Thanks, On Sat, Dec 29, 2012 at 10:10 AM, Michael G Schwern via RT <bug-App-cpanminus@rt.cpan.org> wrote: Show quoted text
> Queue: App-cpanminus > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=81518 > > > I'm pretty sure its cpanminus which is doing that, not ExtUtils::Install. Moved > it into the App-cpanminus queue. > > It's this... > > my @cmd = ( > ($self->{sudo} ? 'sudo' : ()), > $^X, > '-MExtUtils::Install=install', > '-e', > qq[install({ 'blib/meta' => '$base/$Config{archname}/.meta/$dist->{distvname}' > })], > ); > > cpanm is already scraping INSTALL_BASE out of PERL_MM_OPT to figure out $base. > It would need to do DESTDIR as well. Another bug there is its not looking for > PERL_MB_OPT (--install_base and --destdir) so this will be all wrong with > Module::Build. >
-- Tatsuhiko Miyagawa
Subject: Re: [rt.cpan.org #81518] .meta installation ignores DESTDIR and INSTALLARCHLIB
Date: Sat, 29 Dec 2012 19:32:15 -0800
To: bug-App-cpanminus [...] rt.cpan.org
From: Tatsuhiko Miyagawa <miyagawa [...] gmail.com>
On Sat, Dec 29, 2012 at 10:10 AM, Michael G Schwern via RT <bug-App-cpanminus@rt.cpan.org> wrote: Show quoted text
> Another bug there is its not looking for > PERL_MB_OPT (--install_base and --destdir) so this will be all wrong with > Module::Build.
My assumption here is 99% of the case if you set install_base, you have to set these variables to PERL_MM_OPT *and* PERL_MB_OPT at the same time. This is usually the case if you use cpanm -L or Carton, where these variables are automatically set by the callers. You're right that it could technically go wrong if you have a different value in MM and MB, but guess that's a weird configuration to shoot your own feet. -- Tatsuhiko Miyagawa