Bug#1022858: perl-base: lots of duplicate files between perl-modules-5.32 and perl-base

Niko Tyni ntyni at debian.org
Sun Nov 27 20:27:01 GMT 2022


On Thu, Oct 27, 2022 at 03:27:35AM +0200, Marc Lehmann wrote:
> Package: perl-base
> Version: 5.32.1-4+deb11u2
> Severity: minor
> X-Debbugs-Cc: reportbug at plan9.de
> 
> Dear Maintainer,
> 
> I recently installed a fresh bullseye and ran jdupes to deduplicate files.
> 
> To my surprise, this reduced the installed size (on a zstd-compressed btrfs filesystem)
> from 2GB to 1.3GB.
> 
> This was rather unexpected and I investigated.
> 
> One of the larger reasons for this size reduction is a large number of relatively large files
> that are identical in perl-modules-5.32 and perl-base, random example:
> 
> -rw-r--r-- 1 root root 1466 Sep 24  2021 /usr/lib/x86_64-linux-gnu/perl-base/unicore/lib/Lb/CL.pl
> -rw-r--r-- 1 root root 1466 Sep 24  2021 /usr/share/perl/5.32.1/unicore/lib/Lb/CL.pl
> 
> I wonder if thid duplication is intended, and if yes, maybe hardlinks should be used to save space.

It's intentional and has been the case since the stretch release.

The libperl5.xx + perl-modules-5.xx set of packages can be coinstalled
between different major versions and architectures, so they need to
pull in the full standard library. OTOH a limited part of the standard
library needs to be available for perl-base at all times.

The duplication could be solved with a small extra package like
perl-base-modules-5.xx that both could depend on, but the savings would
be just 5.5MB as of bullseye/amd64. And having the separate copies inside
perl-base (which is Essential:yes) makes it more robust during upgrades.

I can't think of a way to use hard links here.
-- 
Niko Tyni   ntyni at debian.org




More information about the Perl-maintainers mailing list