From 2a46f3277cb96729cec637be5c29733eed39a502 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 26 Apr 2016 16:24:09 +0200 Subject: Add xdg_app_dir_install/update helpers These don't do much atm, but will let us clean up the child_repo handling --- app/xdg-app-builtins-install.c | 20 +++++++------------- app/xdg-app-builtins-update.c | 19 +++++++------------ 2 files changed, 14 insertions(+), 25 deletions(-) (limited to 'app') diff --git a/app/xdg-app-builtins-install.c b/app/xdg-app-builtins-install.c index c526112..c9658a6 100644 --- a/app/xdg-app-builtins-install.c +++ b/app/xdg-app-builtins-install.c @@ -253,19 +253,13 @@ xdg_app_builtin_install (int argc, char **argv, GCancellable *cancellable, GErro if (g_file_query_exists (deploy_base, cancellable)) return xdg_app_fail (error, "Ref %s already deployed", ref); - if (!opt_no_pull) - { - if (!xdg_app_dir_pull (dir, repository, ref, opt_subpaths, NULL, - cancellable, error)) - return FALSE; - } - - if (!opt_no_deploy) - { - if (!xdg_app_dir_deploy_install (dir, ref, repository, opt_subpaths, - cancellable, error)) - return FALSE; - } + if (!xdg_app_dir_install (dir, + opt_no_pull, + opt_no_deploy, + ref, repository, opt_subpaths, + NULL, + cancellable, error)) + return FALSE; return TRUE; } diff --git a/app/xdg-app-builtins-update.c b/app/xdg-app-builtins-update.c index 4280287..70364cd 100644 --- a/app/xdg-app-builtins-update.c +++ b/app/xdg-app-builtins-update.c @@ -97,18 +97,13 @@ do_update (XdgAppDir* dir, if (subpaths == NULL) return FALSE; - if (!opt_no_pull) - { - if (!xdg_app_dir_pull (dir, repository, ref, opt_subpaths ? opt_subpaths : subpaths, - NULL, cancellable, error)) - return FALSE; - } - - if (!opt_no_deploy) - { - if (!xdg_app_dir_deploy_update (dir, ref, repository, opt_commit, cancellable, error)) - return FALSE; - } + if (!xdg_app_dir_update (dir, + opt_no_pull, + opt_no_deploy, + ref, repository, opt_commit, opt_subpaths, + NULL, + cancellable, error)) + return FALSE; return TRUE; } -- cgit v1.2.1