summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2016-01-22 10:34:47 +0100
committerAlexander Larsson <alexl@redhat.com>2016-01-22 10:34:47 +0100
commit22ec9837bf11e944b9a76804e06286c8acfbeef3 (patch)
tree7f1957d5d8f8d6716b37e504c2a393235b418c76 /app
parent64da5f5602c7aeeed5851b47874ae4e91fe26554 (diff)
downloadxdg-app-22ec9837bf11e944b9a76804e06286c8acfbeef3.tar.gz
build: When using a writable /usr, don't use runtime extensions
These are readonly and writes there will fail. Instead you need to pass the --sdk-extensions you want explicitly to build-init.
Diffstat (limited to 'app')
-rw-r--r--app/xdg-app-builtins-build.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/xdg-app-builtins-build.c b/app/xdg-app-builtins-build.c
index 7e7fdb3..afc2bb3 100644
--- a/app/xdg-app-builtins-build.c
+++ b/app/xdg-app-builtins-build.c
@@ -70,6 +70,7 @@ xdg_app_builtin_build (int argc, char **argv, GCancellable *cancellable, GError
int rest_argv_start, rest_argc;
g_autoptr(XdgAppContext) arg_context = NULL;
g_autoptr(XdgAppContext) app_context = NULL;
+ gboolean custom_usr;
context = g_option_context_new ("DIRECTORY [COMMAND [args...]] - Build in directory");
@@ -134,9 +135,11 @@ xdg_app_builtin_build (int argc, char **argv, GCancellable *cancellable, GError
argv_array = g_ptr_array_new_with_free_func (g_free);
g_ptr_array_add (argv_array, g_strdup (HELPER));
+ custom_usr = FALSE;
usr = g_file_get_child (app_deploy, "usr");
if (g_file_query_exists (usr, cancellable))
{
+ custom_usr = TRUE;
runtime_files = g_object_ref (usr);
g_ptr_array_add (argv_array, g_strdup ("-W"));
}
@@ -156,7 +159,8 @@ xdg_app_builtin_build (int argc, char **argv, GCancellable *cancellable, GError
xdg_app_run_add_environment_args (argv_array, NULL, app_id,
app_context, NULL);
- if (!xdg_app_run_add_extension_args (argv_array, runtime_metakey, runtime_ref, cancellable, error))
+ if (!custom_usr &&
+ !xdg_app_run_add_extension_args (argv_array, runtime_metakey, runtime_ref, cancellable, error))
return FALSE;
for (i = 0; opt_bind_mounts != NULL && opt_bind_mounts[i] != NULL; i++)