[gnome-builder] flatpak: check for paths via the host
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] flatpak: check for paths via the host
- Date: Mon, 29 Nov 2021 23:10:17 +0000 (UTC)
commit 4b071693e921580fc6be123e92dbf14f15ef82e9
Author: Christian Hergert <chergert redhat com>
Date: Mon Nov 29 15:07:24 2021 -0800
flatpak: check for paths via the host
Fixes #1574
src/plugins/flatpak/gbp-flatpak-aux.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/flatpak/gbp-flatpak-aux.c b/src/plugins/flatpak/gbp-flatpak-aux.c
index 4044adcfa..a1c125064 100644
--- a/src/plugins/flatpak/gbp-flatpak-aux.c
+++ b/src/plugins/flatpak/gbp-flatpak-aux.c
@@ -25,6 +25,8 @@
#include "gbp-flatpak-aux.h"
#define SYSTEM_FONTS_DIR "/usr/share/fonts"
+#define SYSTEM_LOCAL_FONTS_DIR "/usr/local/share/fonts"
+#define HOST_PREFIX "/var/run/host"
/* dirs are reversed from flatpak because we will always have
* /var/cache/fontconfig inside of flatpak. We really need another
@@ -85,7 +87,7 @@ gbp_flatpak_aux_init (void)
"<!DOCTYPE fontconfig SYSTEM \"fonts.dtd\">\n"
"<fontconfig>\n");
- if (g_file_test (SYSTEM_FONTS_DIR, G_FILE_TEST_EXISTS))
+ if (_ide_path_query_exists_on_host (SYSTEM_FONTS_DIR))
{
/* TODO: How can we *force* this read-only? */
g_ptr_array_add (maps, g_strdup ("--bind-mount=/run/host/fonts=" SYSTEM_FONTS_DIR));
@@ -94,7 +96,7 @@ gbp_flatpak_aux_init (void)
SYSTEM_FONTS_DIR);
}
- if (g_file_test ("/usr/local/share/fonts", G_FILE_TEST_EXISTS))
+ if (_ide_path_query_exists_on_host (SYSTEM_LOCAL_FONTS_DIR))
{
/* TODO: How can we *force* this read-only? */
g_ptr_array_add (maps, g_strdup ("--bind-mount=/run/host/local-fonts=/usr/local/share/fonts"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]