Hello,

On Sat, Aug 19, 2017 at 09:15:24PM -0400, Theodore Ts'o wrote:
> On Sun, Aug 20, 2017 at 01:22:52AM +0200, Marco d'Itri wrote:
> > On Aug 20, Theodore Ts'o <ty...@mit.edu> wrote:
> > 
> > > By the way, I was just taking a quick look, and e2fsprogs isn't the
> > > only offender in this regard.  Out of a 201 MB i386 minbase chroot, 33
> > > MB, or over 16% can be found in /usr/share/locale.  The next largest
> > > hierarchies under /usr/share are /usr/share/doc, at 9.4 MB, and
> > > /usr/share/man, at 6.1 MB.
> > > 
> > > So if the goal is to shrink minbase, that might be a really good place
> > > to start.  Packages that might be good initial first targets would
> > > probably be coreutils, dpkg, and gnupg.
> >
> > I am not persuaded that we should split a significant number of packages 
> > (how many? Where do you draw the line?) this way: we already have a tool 
> > to solve this in a general way, i.e. localepurge.
> 
> From the localepurge package description:
> 
>    This tool is a hack which is *not* integrated with the system's
>    package management system and therefore is not for the faint of heart.
>    Its interference can provoke strange, but usually harmless, behavior in
>    programs related to apt/dpkg, such as dpkg-repack, reportbug, etc.
> 
> In either case, it seems unlikely people would be happy doing using
> either localepurge or dpkg --path-exclude for official Docker images.

It's already being used to get rid of some/most /usr/share/doc
content in the 'slim' variant of the "official" Debian images.

https://github.com/tianon/docker-brew-debian/issues/48

> Splitting out the locale files is going to be much easier to support
> than trying to hammer localremove into debootstrap.
> 
> Furthermore, it's not a significant number of packages, simply because
> there aren't a huge number of packages in minbase that have locale
> files to begin with, and only a handful of those have significantly
> sized locale files.

While I see localepurge as the general solution, I agree your suggestion
of splitting locales out (and shipping them in separate 'Priority:
important' packages thus not being included in 'minbase') has some value
simply by improving the 'out of the box' experience. Maybe it's worth
discussing it to see if there's enough consensus to implement it for
all/biggest minbase packages and where we draw the line if we only
do the top ones.

An example of where this is already implemented is util-linux-locales
(but it has Priority: optional, not sure why it's like that).

I've your information as an item (and appendix with your calculations
table) on https://wiki.debian.org/BusterPriorityRequalification

At the same time I also want to point out that space saving is just
one small detail this. Shrinking the number of 'Essential: yes'
packages has several other benefits, including simplifying
bootstrapping, allowing dependency tracking...
Splitting locales should be just considered an additional parallell
effort to shrinking Essential.

Regards,
Andreas Henriksson

Reply via email to