summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2016-04-26 16:24:09 +0200
committerAlexander Larsson <alexl@redhat.com>2016-04-26 16:24:09 +0200
commit2a46f3277cb96729cec637be5c29733eed39a502 (patch)
tree7aa4d837ffdeabec067423ab5131c35202962bdb /app
parent64a28a9e7cec4e9841118772c6a61ea62bd66ad1 (diff)
downloadxdg-app-2a46f3277cb96729cec637be5c29733eed39a502.tar.gz
Add xdg_app_dir_install/update helpers
These don't do much atm, but will let us clean up the child_repo handling
Diffstat (limited to 'app')
-rw-r--r--app/xdg-app-builtins-install.c20
-rw-r--r--app/xdg-app-builtins-update.c19
2 files changed, 14 insertions, 25 deletions
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;
}