forked from Mirrors/flatpak-builder
utils: add GSubprocessFlags parameter
This allows us to pass it through in the case we're running in the same pid namespace as the flatpak-builder process. Closes: #100 Approved by: alexlarssontingping/wmclass
parent
1929fd1cc6
commit
897fe1b768
|
@ -830,6 +830,7 @@ main (int argc,
|
|||
{
|
||||
if (!builder_maybe_host_spawnv (NULL,
|
||||
NULL,
|
||||
0,
|
||||
&error,
|
||||
argv))
|
||||
{
|
||||
|
|
|
@ -1867,7 +1867,7 @@ command (GFile *app_dir,
|
|||
g_ptr_array_add (args, g_strdup (commandline));
|
||||
g_ptr_array_add (args, NULL);
|
||||
|
||||
return builder_maybe_host_spawnv (NULL, NULL, error, (const char * const *)args->pdata);
|
||||
return builder_maybe_host_spawnv (NULL, NULL, 0, error, (const char * const *)args->pdata);
|
||||
}
|
||||
|
||||
typedef gboolean (*ForeachFileFunc) (BuilderManifest *self,
|
||||
|
@ -2037,7 +2037,7 @@ appstream_compose (GFile *app_dir,
|
|||
g_ptr_array_add (args, NULL);
|
||||
va_end (ap);
|
||||
|
||||
if (!builder_maybe_host_spawnv (NULL, NULL, error, (const char * const *)args->pdata))
|
||||
if (!builder_maybe_host_spawnv (NULL, NULL, 0, error, (const char * const *)args->pdata))
|
||||
{
|
||||
g_prefix_error (error, "ERROR: appstream-compose failed: ");
|
||||
return FALSE;
|
||||
|
|
|
@ -1279,7 +1279,7 @@ build (GFile *app_dir,
|
|||
|
||||
g_ptr_array_add (args, NULL);
|
||||
|
||||
if (!builder_maybe_host_spawnv (cwd_file, NULL, error, (const char * const *)args->pdata))
|
||||
if (!builder_maybe_host_spawnv (cwd_file, NULL, 0, error, (const char * const *)args->pdata))
|
||||
{
|
||||
g_prefix_error (error, "module %s: ", module_name);
|
||||
return FALSE;
|
||||
|
|
|
@ -160,7 +160,7 @@ run_script (BuilderContext *context,
|
|||
|
||||
source_dir_path_canonical_file = g_file_new_for_path (source_dir_path_canonical);
|
||||
|
||||
return builder_maybe_host_spawnv (source_dir_path_canonical_file, NULL, error, (const char * const *)args->pdata);
|
||||
return builder_maybe_host_spawnv (source_dir_path_canonical_file, NULL, 0, error, (const char * const *)args->pdata);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1456,6 +1456,7 @@ sigint_handler (gpointer user_data)
|
|||
gboolean
|
||||
builder_host_spawnv (GFile *dir,
|
||||
char **output,
|
||||
GSubprocessFlags flags,
|
||||
GError **error,
|
||||
const gchar * const *argv)
|
||||
{
|
||||
|
@ -1611,13 +1612,14 @@ builder_host_spawnv (GFile *dir,
|
|||
gboolean
|
||||
builder_maybe_host_spawnv (GFile *dir,
|
||||
char **output,
|
||||
GSubprocessFlags flags,
|
||||
GError **error,
|
||||
const gchar * const *argv)
|
||||
{
|
||||
if (flatpak_is_in_sandbox ())
|
||||
return builder_host_spawnv (dir, output, error, argv);
|
||||
return builder_host_spawnv (dir, output, 0, error, argv);
|
||||
|
||||
return flatpak_spawnv (dir, output, 0, error, argv);
|
||||
return flatpak_spawnv (dir, output, flags, error, argv);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -63,10 +63,12 @@ gboolean builder_migrate_locale_dirs (GFile *root_dir,
|
|||
|
||||
gboolean builder_host_spawnv (GFile *dir,
|
||||
char **output,
|
||||
GSubprocessFlags flags,
|
||||
GError **error,
|
||||
const gchar * const *argv);
|
||||
gboolean builder_maybe_host_spawnv (GFile *dir,
|
||||
char **output,
|
||||
GSubprocessFlags flags,
|
||||
GError **error,
|
||||
const gchar * const *argv);
|
||||
|
||||
|
|
Loading…
Reference in New Issue