Skip to content
Snippets Groups Projects
Commit a7741724 authored by Simon McVittie's avatar Simon McVittie
Browse files

runtime: Don't use bwrap to run locale-gen when not required


If we're running locale-gen on the host system, we might as well just
run it, without wrapping bwrap around it. This requires the new
--output-dir option in p-v-locale-gen.

To stay consistent, also move from bwrap --chdir DIR to
p-v-locale-gen --output-dir DIR in the case where we still need to
use bwrap.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 135bea0b
No related branches found
No related tags found
No related merge requests found
...@@ -731,16 +731,11 @@ ensure_locales (PvRuntime *self, ...@@ -731,16 +731,11 @@ ensure_locales (PvRuntime *self,
locale_gen = g_build_filename (self->tools_dir, locale_gen = g_build_filename (self->tools_dir,
"pressure-vessel-locale-gen", "pressure-vessel-locale-gen",
NULL); NULL);
/* We don't actually need to use bwrap when we're just running on
flatpak_bwrap_add_args (run_locale_gen, * the host system. */
self->bubblewrap,
"--ro-bind", "/", "/",
NULL);
pv_bwrap_add_api_filesystems (run_locale_gen);
flatpak_bwrap_add_args (run_locale_gen, flatpak_bwrap_add_args (run_locale_gen,
"--bind", locales, locales,
"--chdir", locales,
locale_gen, locale_gen,
"--output-dir", locales,
"--verbose", "--verbose",
NULL); NULL);
} }
...@@ -764,8 +759,8 @@ ensure_locales (PvRuntime *self, ...@@ -764,8 +759,8 @@ ensure_locales (PvRuntime *self,
flatpak_bwrap_add_args (run_locale_gen, flatpak_bwrap_add_args (run_locale_gen,
"--ro-bind", self->tools_dir, "/run/host/tools", "--ro-bind", self->tools_dir, "/run/host/tools",
"--bind", locales, "/overrides/locales", "--bind", locales, "/overrides/locales",
"--chdir", "/overrides/locales",
locale_gen, locale_gen,
"--output-dir", "/overrides/locales",
"--verbose", "--verbose",
NULL); NULL);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment