commit:     bfb2731f7200e9a1f19b65d928586c209b1bf4a2
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri May 15 03:36:19 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri May 15 03:39:56 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=bfb2731f

targets: Test for locale-gen

locale-gen is only provided by glibc and not by others.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/stage1/chroot.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh
index ac9d68ea..b48fda65 100755
--- a/targets/stage1/chroot.sh
+++ b/targets/stage1/chroot.sh
@@ -82,7 +82,9 @@ run_merge "--oneshot ${clst_buildpkgs}"
 # locale-gen does not support the ROOT variable, and as such glibc simply does
 # not run locale-gen when ROOT is set. Since we've set LANG, we need to run
 # locale-gen explicitly.
-locale-gen --destdir "${clst_root_path}"/ || die "locale-gen failed"
+if [ -x "$(command -v locale-gen)" ]; then
+       locale-gen --destdir "${clst_root_path}"/ || die "locale-gen failed"
+fi
 
 # Why are we removing these? Don't we need them for final make.conf?
 for useexpand in ${clst_HOSTUSEEXPAND}; do

Reply via email to