diff options
author | Alexander Larsson <alexl@redhat.com> | 2016-04-26 12:06:03 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2016-04-26 12:06:03 +0200 |
commit | 3ec67c57e69d54e50cc1fe5de9ae68fe0a54e374 (patch) | |
tree | c5f5f8b4b39fe2dcd5ef0ddb4ead97eab8e413f8 /common | |
parent | 4734eb95df69bfb8ee6c878ca3cd694018eee5b7 (diff) | |
download | xdg-app-3ec67c57e69d54e50cc1fe5de9ae68fe0a54e374.tar.gz |
xgd_app_dir_deploy_update: Use the shared system helper
Diffstat (limited to 'common')
-rw-r--r-- | common/xdg-app-dir.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/common/xdg-app-dir.c b/common/xdg-app-dir.c index 8d90642..d0a71ec 100644 --- a/common/xdg-app-dir.c +++ b/common/xdg-app-dir.c @@ -2668,7 +2668,6 @@ xdg_app_dir_deploy_update (XdgAppDir *self, g_autofree char *pulled_checksum = NULL; g_autofree char *active_checksum = NULL; g_autofree char *remote_and_ref = NULL; - g_autoptr(XdgAppSystemHelper) helper = NULL; if (checksum_or_latest != NULL) return xdg_app_fail (error, "Can't update to a specific commit without root permissions"); @@ -2679,17 +2678,9 @@ xdg_app_dir_deploy_update (XdgAppDir *self, active_checksum = xdg_app_dir_read_active (self, ref, NULL); if (active_checksum == NULL || strcmp (active_checksum, pulled_checksum) != 0) { - helper = xdg_app_system_helper_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, - G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | - G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS, - "org.freedesktop.XdgApp.SystemHelper", - "/org/freedesktop/XdgApp/SystemHelper", - cancellable, - error); - if (helper == NULL) - return FALSE; + g_assert (self->system_helper != NULL); - if (!xdg_app_system_helper_call_deploy_sync (helper, + if (!xdg_app_system_helper_call_deploy_sync (self->system_helper, gs_file_get_path_cached (ostree_repo_get_path (self->child_repo)), XDG_APP_HELPER_DEPLOY_FLAGS_UPDATE, ref, |