From 5e2f9f259cc22743b90d58f51fd4425673e47818 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Wed, 20 May 2020 12:38:03 +0100
Subject: [PATCH] runtime: Bind-mount /overrides to run locale-gen

Even in the case where we're using a temporary directory, it's going
to survive at least as long as the call to locale-gen, so we don't
need to translate it into a long series of --dir and --symlink
directives.

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 src/runtime.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/runtime.c b/src/runtime.c
index 04ca1f704..0b53fc6e4 100644
--- a/src/runtime.c
+++ b/src/runtime.c
@@ -1120,7 +1120,9 @@ ensure_locales (PvRuntime *self,
                                      NULL);
 
       flatpak_bwrap_append_bwrap (run_locale_gen, bwrap);
-      pv_bwrap_copy_tree (run_locale_gen, self->overrides, "/overrides");
+      flatpak_bwrap_add_args (bwrap,
+                              "--ro-bind", self->overrides, "/overrides",
+                              NULL);
 
       if (!flatpak_bwrap_bundle_args (run_locale_gen, 1, -1, FALSE,
                                       &local_error))
-- 
GitLab