1 |
Stable glibc now always provides a UTF-8 capable locale, which many |
2 |
packages require. Set this as the default LANG. |
3 |
|
4 |
Running locale-gen in stage1 should also solve bug #536938. |
5 |
|
6 |
Bug: https://bugs.gentoo.org/536938 |
7 |
Bug: https://bugs.gentoo.org/710762 |
8 |
Bug: https://bugs.gentoo.org/714906 |
9 |
Signed-off-by: Matt Turner <mattst88@g.o> |
10 |
--- |
11 |
targets/stage1/chroot.sh | 12 ++++++++++++ |
12 |
1 file changed, 12 insertions(+) |
13 |
|
14 |
diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh |
15 |
index 0caf49ee..88a36481 100755 |
16 |
--- a/targets/stage1/chroot.sh |
17 |
+++ b/targets/stage1/chroot.sh |
18 |
@@ -57,6 +57,11 @@ make_destpath /tmp/stage1root |
19 |
run_merge "--oneshot --nodeps sys-apps/baselayout" |
20 |
${clst_sed} -i "/USE=\"${USE} -build\"/d" ${clst_make_conf} |
21 |
|
22 |
+for etc in /etc /tmp/stage1root/etc; do |
23 |
+ echo "LANG=C.UTF8" > ${etc}/env.d/02locale |
24 |
+done |
25 |
+update_env_settings |
26 |
+ |
27 |
# Now, we install our packages |
28 |
if [ -e ${clst_make_conf} ]; then |
29 |
echo "CATALYST_USE=\"-* build ${BINDIST} ${clst_CATALYST_USE}\"" >> ${clst_make_conf} |
30 |
@@ -71,6 +76,13 @@ fi |
31 |
|
32 |
run_merge "--oneshot ${clst_buildpkgs}" |
33 |
|
34 |
+# TODO: Drop this when locale-gen in stable glibc supports ROOT. |
35 |
+# |
36 |
+# locale-gen does not support the ROOT variable, and as such glibc simply does |
37 |
+# not run locale-gen when ROOT is set. Since we've set LANG, we need to run |
38 |
+# locale-gen explicitly. |
39 |
+locale-gen --destdir /tmp/stage1root/ |
40 |
+ |
41 |
# Why are we removing these? Don't we need them for final make.conf? |
42 |
for useexpand in ${clst_HOSTUSEEXPAND}; do |
43 |
x="clst_${useexpand}" |
44 |
-- |
45 |
2.24.1 |