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.