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

runtime: Move more responsibility for runtime setup to here

parent 66f3ecce
No related branches found
No related tags found
No related merge requests found
......@@ -104,6 +104,8 @@ static const char * const libquals[] =
static gboolean pv_runtime_use_host_graphics_stack (PvRuntime *self,
FlatpakBwrap *bwrap,
GError **error);
static void pv_runtime_set_search_paths (PvRuntime *self,
FlatpakBwrap *bwrap);
static void
pv_runtime_init (PvRuntime *self)
......@@ -1760,6 +1762,10 @@ pv_runtime_bind (PvRuntime *self,
g_return_val_if_fail (!pv_bwrap_was_finished (bwrap), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
/* Start with just the root tmpfs (which appears automatically)
* and the standard API filesystems */
pv_bwrap_add_api_filesystems (bwrap);
if (!bind_runtime (self, bwrap, error))
return FALSE;
......@@ -1772,6 +1778,8 @@ pv_runtime_bind (PvRuntime *self,
"/run/pressure-vessel",
NULL);
pv_runtime_set_search_paths (self, bwrap);
return TRUE;
}
......
......@@ -47,8 +47,6 @@ PvRuntime *pv_runtime_new (const char *source_files,
void pv_runtime_append_lock_adverb (PvRuntime *self,
FlatpakBwrap *bwrap);
void pv_runtime_set_search_paths (PvRuntime *self,
FlatpakBwrap *bwrap);
gboolean pv_runtime_bind (PvRuntime *self,
FlatpakBwrap *bwrap,
GError **error);
......
......@@ -1026,15 +1026,9 @@ main (int argc,
tools_dir,
error);
/* Start with just the root tmpfs (which appears automatically)
* and the standard API filesystems */
pv_bwrap_add_api_filesystems (bwrap);
if (runtime == NULL)
goto out;
pv_runtime_set_search_paths (runtime, bwrap);
if (!pv_runtime_bind (runtime, bwrap, error))
goto out;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment