flatpak: add access to host system

THis allows us to get access to the hosts symbol directories,
which is necessary for resolving symbols there.
This commit is contained in:
Christian Hergert
2019-05-06 21:24:08 -07:00
parent d8ef9cac0e
commit c115a9b59f
2 changed files with 16 additions and 0 deletions

View File

@ -17,6 +17,8 @@
"--talk-name=org.gtk.vfs.*",
"--system-talk-name=org.freedesktop.PolicyKit1",
"--system-talk-name=org.gnome.Sysprof2",
"--filesystem=home",
"--filesystem=host",
"--filesystem=xdg-run/dconf",
"--filesystem=~/.config/dconf:ro",
"--talk-name=ca.desrt.dconf",

View File

@ -31,6 +31,20 @@ sp_get_symbol_dirs_locked (void)
{
sp_symbol_dirs = g_ptr_array_new ();
g_ptr_array_add (sp_symbol_dirs, g_strdup ("/usr/lib/debug"));
/* Add path to host system if we have it */
if (g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS))
{
static gchar *tries[] = {
"/var/run/host/usr/lib/debug",
};
for (guint i = 0; i < G_N_ELEMENTS (tries); i++)
{
if (g_file_test (tries[i], G_FILE_TEST_EXISTS))
g_ptr_array_add (sp_symbol_dirs, g_strdup (tries[i]));
}
}
}
return sp_symbol_dirs;