Skip to content
Snippets Groups Projects
Commit 123ec291 authored by Ludovico de Nittis's avatar Ludovico de Nittis :palm_tree:
Browse files

Bind the host's locale if we already use libc from the host


If we are using the host's libc, we also bind its `locale` otherwise
it might happen that the container's `locale` will not be able to run.

Signed-off-by: default avatarLudovico de Nittis <ludovico.denittis@collabora.com>
parent fe2a689f
No related branches found
No related tags found
No related merge requests found
...@@ -1059,6 +1059,7 @@ pv_runtime_use_host_graphics_stack (PvRuntime *self, ...@@ -1059,6 +1059,7 @@ pv_runtime_use_host_graphics_stack (PvRuntime *self,
gboolean any_architecture_works = FALSE; gboolean any_architecture_works = FALSE;
g_autofree gchar *localedef = NULL; g_autofree gchar *localedef = NULL;
g_autofree gchar *ldconfig = NULL; g_autofree gchar *ldconfig = NULL;
g_autofree gchar *locale = NULL;
g_autofree gchar *dir_on_host = NULL; g_autofree gchar *dir_on_host = NULL;
g_autoptr(SrtSystemInfo) system_info = srt_system_info_new (NULL); g_autoptr(SrtSystemInfo) system_info = srt_system_info_new (NULL);
g_autoptr(SrtObjectList) egl_icds = NULL; g_autoptr(SrtObjectList) egl_icds = NULL;
...@@ -1538,6 +1539,23 @@ pv_runtime_use_host_graphics_stack (PvRuntime *self, ...@@ -1538,6 +1539,23 @@ pv_runtime_use_host_graphics_stack (PvRuntime *self,
NULL); NULL);
} }
locale = g_find_program_in_path ("locale");
if (locale == NULL)
{
g_warning ("Cannot find locale in PATH");
}
else
{
g_autofree gchar *target = g_build_filename ("/run/host",
locale, NULL);
flatpak_bwrap_add_args (bwrap,
"--symlink", target,
"/overrides/bin/locale",
NULL);
}
ldconfig = g_find_program_in_path ("ldconfig"); ldconfig = g_find_program_in_path ("ldconfig");
if (ldconfig == NULL) if (ldconfig == NULL)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment