I just tried (and failed) to pack a script with App::FatPacker and
noticed Gentoo follows the bad example of most other distributions in
removing all .packlist files from Perl module installations.

These files are the only system-independent way of determining which
modules belong together as part of a CPAN distribution, e.g. to find
that Template::Parser belongs to the Template Toolkit proper while
Template::Timer is an external add-on. FatPacker needs them to determine
which modules to pack into the archive that makes a standalone script
not requiring any external non-core modules, and so do various other
bits such as Module::Installed.

Can we please keep these? It's not like a handful of files with a couple
hundred bytes per installed module at worst made any significant
difference in either disk use or search times, but removing them is a
Bad Idea that probably came from Debian and needlessly breaks stuff.

I solved my problem by 

a) removing the patches to ExtUtils::MakeMaker that delete packlist
creation from the perl and vendor targets in generated makefiles, and

b) modifying perl-module.eclass so it removes only empty *.bs files:

--- /usr/portage/eclass/perl-module.eclass.orig 2012-09-01 08:26:44.245212715 
-0600
+++ /usr/portage/eclass/perl-module.eclass      2012-09-01 10:22:10.308419665 
-0600
@@ -123,7 +123,7 @@
                        --installdirs=vendor \
                        --libdoc= \
                        --destdir="${D}" \
-                       --create_packlist=0 \
+                       --create_packlist=1 \
                        "${myconf_local[@]}"
                einfo "perl Build.PL" "$@"
                perl Build.PL "$@" <<< "${pm_echovar}" \
@@ -341,8 +341,7 @@
        debug-print-function $FUNCNAME "$@"
        perl_set_version
        if [[ -d ${D}/${VENDOR_ARCH} ]] ; then
-               find "${D}/${VENDOR_ARCH}" -type f -a \( -name .packlist \
-                       -o \( -name '*.bs' -a -empty \) \) -delete
+               find "${D}/${VENDOR_ARCH}" -type f -a \( -name '*.bs' -a -empty 
\) -delete
                find "${D}" -depth -mindepth 1 -type d -empty -delete
        fi
 }

The perl_delete_packlist() function should probably not be called that any more
as it only deals with DynaLoader files now but that would require changing a
few ebuilds as well:

dev-libs/libprelude
www-apache/mod_perl
net-analyzer/rrdtool

I think Gentoo of all distributions should aim to  provide software as
"original" as possible. If there are any reasons that I have ignored so
far why people would want the current behavior, how about I make this
patch conditional on a new use flag?

cheers,
        Matthias

Attachment: signature.asc
Description: Digital signature

Reply via email to