fix build rootfs locale failure warnings
Fixes stuff like:
dpkg-genbuildinfo --build=full
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:",
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Just unset all locale related strings and force C locale.
Test: built an image
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I9eaa101afaff15c4bd51c45319df2508dd90fb9d
diff --git a/net/test/build_rootfs.sh b/net/test/build_rootfs.sh
index 5049bc6..b5b999d 100755
--- a/net/test/build_rootfs.sh
+++ b/net/test/build_rootfs.sh
@@ -19,6 +19,13 @@
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
+# Make sure we're in C locale so build inside chroot does not complain
+# about missing files
+unset LANG LANGUAGE \
+ LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION LC_MEASUREMENT \
+ LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME
+export LC_ALL=C
+
usage() {
echo -n "usage: $0 [-h] [-s stretch|buster] [-a i386|amd64|armhf|arm64] "
echo "[-m http://mirror/debian] [-n net_test.rootfs.`date +%Y%m%d`]"