As we cannot and should not rely on how the containers were generated,
let's force the container LANG to be en_US.UTF-8 otherwise some
containers (Debian 9, Ubuntu 16, and Ubuntu 18) would simply bail when
dealing with environment variables inherited from Gitlab CI which
contains non-POSIX characteres, such as "Fidêncio".

Unfortunately, there's no standard way to do this accross different
distros, leaving us with this "happy little accident" of setting up LANG
in the way it's done right now.

Signed-off-by: Fabiano Fidêncio <fiden...@redhat.com>
---
 guests/lcitool | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/guests/lcitool b/guests/lcitool
index 49bb50b..a630971 100755
--- a/guests/lcitool
+++ b/guests/lcitool
@@ -735,6 +735,10 @@ class Application:
                 RUN pip3 install {pip_pkgs}
             """).format(**varmap))
 
+        sys.stdout.write(textwrap.dedent("""
+            ENV LANG "en_US.UTF-8"
+        """).format(**varmap))
+
         if args.cross_arch:
             sys.stdout.write(textwrap.dedent("""
                 ENV ABI "{cross_abi}"
-- 
2.23.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to