Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 438660 - perl-module.eclass should not delete .packlist files
Summary: perl-module.eclass should not delete .packlist files
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Gentoo Perl team
Keywords: PATCH
Depends on:
Blocks: perl-eclass 504254 perl-eclass-6
  Show dependency tree
Reported: 2012-10-17 03:30 UTC by Matthias Bethke
Modified: 2015-12-19 22:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Bethke 2012-10-17 03:30:10 UTC
Mostly quoting <> on the Gentoo-Dev-ML:

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.

The following would need to be changed:

a) remove the patches to ExtUtils::MakeMaker that delete packlist creation from the perl and vendor targets in generated Makefiles. In particular this patch is evil:
All the single- and double-line modifications that deal with packlists need to go

b) modify 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 \
                einfo "perl Build.PL" "$@"
                perl Build.PL "$@" <<< "${pm_echovar}" \
@@ -341,8 +341,7 @@
        debug-print-function $FUNCNAME "$@"
        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

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:


Reproducible: Always

Steps to Reproduce:
1. Emerge any Perl module, say dev-perl/yaml
Actual Results:  
No .packlist file installed

Expected Results:  
A .packlist should exist in the module's directory, e.g. /usr/lib64/perl5/vendor_perl/5.16.1/x86_64-linux-thread-multi/auto/YAML/.packlist
Comment 1 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2013-08-25 15:25:05 UTC
I just realized, this behaviour is being patched out in not one, but two places; 

both perl-core/EUMM and dev-lang/perl in the bundled EUMM.  See bug #221179
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2015-12-19 22:06:41 UTC
This should be fixed starting with Perl 5.22.1 and EAPI=6.