Commit 74d20c1
installer: seed /etc/locale.conf before package install
dracut's 20i18n module reads /etc/locale.conf when it builds an initrd, and
the initramfs rpm installs a file trigger that runs mkinitrd at the END of the
package transaction started by _install_packages(). m_locale ran at
POST_INSTALL, so the file was written after that trigger had already fired.
dracut therefore aborted i18n setup with
"i18n_vars not set! Please set up i18n_vars in configuration file."
and fell back to embedding every keymap.
Move the write into the PRE_PKGS_INSTALL phase, where it lands before the
transaction. _initialize_system() runs immediately before that phase, so the
file appears at very nearly the same point in the sequence.
localedef cannot move with it. It runs inside the chroot, and at
PRE_PKGS_INSTALL the target holds only an initialised rpm database and the
`filesystem` rpm - glibc, which provides /usr/bin/localedef, is not installed
until _install_packages(). So locale setup is split along the line the phases
already draw:
m_locale.py PRE_PKGS_INSTALL writes /etc/locale.conf
m_localedef.py POST_INSTALL runs localedef
A separate module rather than a two-phase one because install_phase is a
scalar compared with !=, in both photon-os-installer 2.8 and master; making a
single module span two phases would mean changing the dispatcher, and 2.8 does
not even have the MODULES_DISPATCHABLE_PHASES guard that master added. Two
modules need no dispatcher change and behave identically on both.
Signed-off-by: Daniel Casota <dcasota@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JW73JTCUGRcaNTUEQcAMtf1 parent c5116e8 commit 74d20c1
2 files changed
Lines changed: 45 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
11 | 22 | | |
12 | 23 | | |
13 | 24 | | |
14 | 25 | | |
15 | 26 | | |
16 | | - | |
17 | | - | |
18 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
19 | 30 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
0 commit comments