forked from Mirrors/flatpak-builder
commit
b06528e0ef
|
@ -39,6 +39,8 @@ static char *opt_arch;
|
|||
static char *opt_branch;
|
||||
static char *opt_command;
|
||||
static gboolean opt_devel;
|
||||
static gboolean opt_log_session_bus;
|
||||
static gboolean opt_log_system_bus;
|
||||
static char *opt_runtime;
|
||||
static char *opt_runtime_version;
|
||||
|
||||
|
@ -49,6 +51,8 @@ static GOptionEntry options[] = {
|
|||
{ "devel", 'd', 0, G_OPTION_ARG_NONE, &opt_devel, "Use development runtime", NULL },
|
||||
{ "runtime", 0, 0, G_OPTION_ARG_STRING, &opt_runtime, "Runtime to use", "RUNTIME" },
|
||||
{ "runtime-version", 0, 0, G_OPTION_ARG_STRING, &opt_runtime_version, "Runtime version to use", "VERSION" },
|
||||
{ "log-session-bus", 0, 0, G_OPTION_ARG_NONE, &opt_log_session_bus, "Log session bus calls", NULL },
|
||||
{ "log-system-bus", 0, 0, G_OPTION_ARG_NONE, &opt_log_system_bus, "Log system bus calls", NULL },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
@ -118,7 +122,9 @@ xdg_app_builtin_run (int argc, char **argv, GCancellable *cancellable, GError **
|
|||
arg_context,
|
||||
opt_runtime,
|
||||
opt_runtime_version,
|
||||
opt_devel ? XDG_APP_RUN_FLAG_DEVEL : 0,
|
||||
(opt_devel ? XDG_APP_RUN_FLAG_DEVEL : 0) |
|
||||
(opt_log_session_bus ? XDG_APP_RUN_FLAG_LOG_SESSION_BUS : 0) |
|
||||
(opt_log_system_bus ? XDG_APP_RUN_FLAG_LOG_SYSTEM_BUS : 0),
|
||||
opt_command,
|
||||
&argv[rest_argv_start + 1],
|
||||
rest_argc - 1,
|
||||
|
|
|
@ -2120,6 +2120,7 @@ dbus_spawn_child_setup (gpointer user_data)
|
|||
static gboolean
|
||||
add_dbus_proxy_args (GPtrArray *argv_array,
|
||||
GPtrArray *dbus_proxy_argv,
|
||||
gboolean enable_logging,
|
||||
GError **error)
|
||||
{
|
||||
int sync_proxy_pipes[2];
|
||||
|
@ -2136,6 +2137,8 @@ add_dbus_proxy_args (GPtrArray *argv_array,
|
|||
|
||||
g_ptr_array_insert (dbus_proxy_argv, 0, g_strdup (DBUSPROXY));
|
||||
g_ptr_array_insert (dbus_proxy_argv, 1, g_strdup_printf ("--fd=%d", sync_proxy_pipes[1]));
|
||||
if (enable_logging)
|
||||
g_ptr_array_add (dbus_proxy_argv, g_strdup ("--log"));
|
||||
|
||||
g_ptr_array_add (dbus_proxy_argv, NULL); /* NULL terminate */
|
||||
|
||||
|
@ -2309,10 +2312,10 @@ xdg_app_run_app (const char *app_ref,
|
|||
if (!xdg_app_run_in_transient_unit (app_ref_parts[1], error))
|
||||
return FALSE;
|
||||
|
||||
if (!add_dbus_proxy_args (argv_array, session_bus_proxy_argv, error))
|
||||
if (!add_dbus_proxy_args (argv_array, session_bus_proxy_argv, (flags & XDG_APP_RUN_FLAG_LOG_SESSION_BUS) != 0, error))
|
||||
return FALSE;
|
||||
|
||||
if (!add_dbus_proxy_args (argv_array, system_bus_proxy_argv, error))
|
||||
if (!add_dbus_proxy_args (argv_array, system_bus_proxy_argv, (flags & XDG_APP_RUN_FLAG_LOG_SYSTEM_BUS) != 0, error))
|
||||
return FALSE;
|
||||
|
||||
app_files = xdg_app_deploy_get_files (app_deploy);
|
||||
|
|
|
@ -82,8 +82,10 @@ GFile *xdg_app_ensure_data_dir (const char *app_id,
|
|||
GError **error);
|
||||
|
||||
typedef enum {
|
||||
XDG_APP_RUN_FLAG_DEVEL = (1<<0),
|
||||
XDG_APP_RUN_FLAG_BACKGROUND = (1<<1),
|
||||
XDG_APP_RUN_FLAG_DEVEL = (1<<0),
|
||||
XDG_APP_RUN_FLAG_BACKGROUND = (1<<1),
|
||||
XDG_APP_RUN_FLAG_LOG_SESSION_BUS = (1<<2),
|
||||
XDG_APP_RUN_FLAG_LOG_SYSTEM_BUS = (1<<3),
|
||||
} XdgAppRunFlags;
|
||||
|
||||
gboolean xdg_app_run_app (const char *app_ref,
|
||||
|
|
|
@ -75,6 +75,23 @@
|
|||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-v</option></term>
|
||||
<term><option>--verbose</option></term>
|
||||
|
||||
<listitem><para>
|
||||
Print debug information during command processing.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--version</option></term>
|
||||
|
||||
<listitem><para>
|
||||
Print version information and exit.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--arch=ARCH</option></term>
|
||||
|
||||
|
@ -251,19 +268,20 @@
|
|||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-v</option></term>
|
||||
<term><option>--verbose</option></term>
|
||||
<term><option>--log-session-bus</option></term>
|
||||
|
||||
<listitem><para>
|
||||
Print debug information during command processing.
|
||||
Log session bus traffic. This can be useful to see what access you need to allow in
|
||||
your D-Bus policy.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--version</option></term>
|
||||
<term><option>--log-system-bus</option></term>
|
||||
|
||||
<listitem><para>
|
||||
Print version information and exit.
|
||||
Log system bus traffic. This can be useful to see what access you need to allow in
|
||||
your D-Bus policy.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
|
Loading…
Reference in New Issue