[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#678227: Bug#641967: Apt downloads all description translations



On Tue, Aug 28, 2012 at 1:14 PM, Julian Andres Klode <jak@debian.org> wrote:
> We could add a switch to apt-cdrom to copy all configured locales for
> d-i purposes,

The question is how apt-cdrom gets to know which locales are configured.
If I read the d-i syslog correctly apt-cdrom is run before 'locales'
is installed and localechooser sets the chroot up, so to have apt-cdrom in
the correct environment localechooser setup either needs to be part of the
bootstrap or we make it so that apt-cdrom doesn't copy any Translation files
and localechooser calls after setting up 'locales' apt-get update to copy
the Translation files over [0]. Or we tell localechooser (or some later d-i
 stage) that it should remove 'excess' Translation files.

The later would have the advantage of working better in multi-user setups
(with different l10n environments), but I am not sure if you can actually
do that with d-i currently - the first two don't, the second additional
changes behavior of apt-cdrom in a way breaking older d-i versions and/or
any other installer/user.

> and then once we have translation files in /var/lib/apt/lists
> only recognize those languages and the ones configured via APT
> configuration. We don't even need a switch, we could just look at this
> list if no languages are explicitely configured for APT or translations
> found in /var/lib/apt/lists.

Mhh. Yeah, we really need to do this to 'preserve' configuration or
otherwise we just get all Translation files again on each update
with a cdrom source (but kinda orthogonal to the "problem" at hand).

So something along the lines of maybe:
if acquire::languages set OR files in /var/lib/apt/lists:
	copy as configured
else
	copy everything

"acquire::languages set" is a bit flaky through, so maybe just
if LANG != "C" OR files in /var/lib/apt/lists
(and "C.UTF-8" and "POSIX", right?)


Best regards

David Kalnischkies


Reply to: