[jenkins-ci PATCH] lcitool: Force LANG=en_US.UTF-8 for the containers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <fidencio@xxxxxxxxxx>
---
 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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux