[jenkins-ci PATCH] lcitool: Generate the en_US.UTF-8 locale for deb containers

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

 



osinfo-db tests require "en_US.UTF-8" locate to be set. Since commit
3b682c416b0d the locales are installed but we have to actually generate
it for the containers.

The reason we don't have to do that for the virtual machines is because
the preseed file used for installed them already forces it:
```
 # Environment configuration
 #
 # Locale, keyboard and timezone. All these will be configured again
 # later with Ansible, but they're required information so we must
 # provide them
 d-i debian-installer/locale string en_US.UTF-8
```

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 guests/lcitool | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guests/lcitool b/guests/lcitool
index 5cf8efe..5b5b622 100755
--- a/guests/lcitool
+++ b/guests/lcitool
@@ -675,7 +675,9 @@ class Application:
                     {package_manager} dist-upgrade -y && \\
                     {package_manager} install --no-install-recommends -y {pkgs} && \\
                     {package_manager} autoremove -y && \\
-                    {package_manager} autoclean -y
+                    {package_manager} autoclean -y && \\
+                    sed -Ei 's,^# (en_US\.UTF-8 .*)$,\\1,' /etc/locale.gen && \\
+                    dpkg-reconfigure locales
             """).format(**varmap))
             if args.cross_arch:
                 # Intentionally a separate RUN command from the above
-- 
2.21.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