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

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



On Fri, Aug 31, 2012 at 12:07 AM, Samuel Thibault <sthibault@debian.org> wrote:
> David Kalnischkies, le Thu 30 Aug 2012 19:43:21 +0200, a écrit :
>> 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'
>
> No, locales is part of the base system, and thus installed and
> configured before CD-ROM inspection by apt-cdrom. apt-cdrom-setup is
> not a step in d-i, it's apt-setup which is one, done after bootstrap,

I take your "No" and re-raise it to "No, yes, but twice".

apt-cdrom is run twice, first as I described it. Feel free to check it
yourself, the first package installed (aka the first entry in
 /var/log/apt/history.log) is 'locales' because everything not part of the
bootstrap is installed with apt-get which uses as source the cdrom
(what else, as mirrors aren't configured yet).

After some more packages are installed the installation reaches the apt-
setup stage in which a mirror will be chosen - but as its first task it
runs apt-cdrom again as you said it - in the locale chosen and installed
earlier. This makes this problem actually solvable, at least for installers
with that behavior …


> and invoking apt-cdrom-setup. apt-cdrom is actually run in the locale
> chosen during installation, so it can simply follow that (I wonder why
> it doesn't seem to be doing it).

As said, apt-cdrom never did and nobody changed it until now - likely also
because nobody of the few people who take care of APT use apt-cdrom on
a daily basis currently - or at least in my case at all.
(which explains a few more needed bugfixes in upcoming 0.9.7.5 …)


I wonder how many people actually depend on that behavior (meaning especially
other distro-installers and multi-language systems), but ignoring my fear to
be once again be flamed to death for an "easy and only logical" behavior
change I just changed apt-cdrom to drop all not configured Translation-*
files from the copy list.

Meaning that on the first run above you will get only Translation-en, while
you get Translation-en and Translation-$LANG (and possibly some more friends
defined by the various environment variables and configs) in the second.
Installers allowing to create multiple users while installing (with different
$LANG) need to re-run apt-cdrom in all of these $LANGs to get the optimal
behavior.


I tried it with a modified multi-arch beta1 cd [0], so at least for debian
it seems to work, but I only run it until a mirror is chosen for the lack
of network, so more testers are welcomed of course …
(You find it only the bzr branch for now, as we haven't made our minds
 yet how to solve #686346 without too much work and breakage risk -
 life would be so easy if dpkg and APT^Wmyself would agree just once …)


If someone feels the urge to kill me for this change now: Add
APT::CDROM::DropTranslation false;
to your configuration file/commandline invocation and you are back
to your "normal" and beloved previous behavior.


Best regards

David Kalnischkies

[0] some hints at http://wiki.debian.org/DebianInstaller/Modify/CD


Reply to: