Release Engineering


FS#15680 - why do we generate locales on the target system twice?

Attached to Project: Release Engineering
Opened by Dieter Plaetinck (Dieter_be) - Saturday, 25 July 2009, 11:02 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Monday, 26 November 2012, 04:45 GMT
Task Type Bug Report
Category AIF
Status Closed
Assigned To Aaron Griffin (phrakture)
Gerhard Brauer (GerBra)
Dieter Plaetinck (Dieter_be)
Architecture All
Severity Low
Priority Normal
Reported Version 2009.02
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No


we run "worker_auto_locale" after install_packages, and we also run "worker_locales" after configure_system.
worker_auto_locale calls target_configure_initial_locale
worker_locales calls target_locale-gen

target_configure_initial_locale parses rc.conf and uncomments locales in ${var_TARGET_DIR}/etc/locale.gen, after which it calls target_locale-gen
target_locale-gen chroots in the target and runs locale-gen.

is it needed that we do this twice? the only things that happen between worker_auto_locale and worker_locales is:
- keymap/font updating in ${var_TARGET_DIR}/etc/rc.conf
- configure_system step (you know, the interactive thing for editing files, setting root pass etc)
- generating mkinitcpio
This task depends upon

Closed by  Gerardo Exequiel Pozzi (djgera)
Monday, 26 November 2012, 04:45 GMT
Reason for closing:  Deferred
Comment by Gerhard Brauer (GerBra) - Saturday, 25 July 2009, 11:21 GMT
It's the same "problem" like mkinitcpio from kernel26 package. If we make it sure that locale-gen is called - either if the user modified anything in configure->locale.gen or not - then we could disable first locale generation.

Otherwise: My opinion in this (and double mkinitcpio) is: So we could be sure that a proper locale file/setting is builded.
The 1,2 minutes this took longer - who cares ?
Comment by Dieter Plaetinck (Dieter_be) - Friday, 16 April 2010, 17:04 GMT
i was told mkinitcpio only depends on mkinitcpio.conf, and locales on locale.gen
so it's fairly trivial to implement an md5 check, which is exactly what i will do :)
Comment by Aaron Griffin (phrakture) - Friday, 16 April 2010, 17:11 GMT
This should be correct. I can't think of any case when you would need to regenerate these things without a config file change. Even if you install new mkinitcpio hooks, you still have to edit the config file