summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2016-04-21 20:19:01 +0200
committerAlexander Larsson <alexl@redhat.com>2016-04-21 20:19:01 +0200
commit91eda8919e06d6d7752a522e4161fb7d2611cbed (patch)
treeffdb0e79d451584a71e46c106540488303799e12 /app
parent21dd53d1ff7541c4dc3e95da3ae15f5eb2a62778 (diff)
downloadxdg-app-91eda8919e06d6d7752a522e4161fb7d2611cbed.tar.gz
common: Move duplicated code into xdg_app_dir_deploy_update
Diffstat (limited to 'app')
-rw-r--r--app/xdg-app-builtins-update.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/app/xdg-app-builtins-update.c b/app/xdg-app-builtins-update.c
index 15a1475..a5aa0d8 100644
--- a/app/xdg-app-builtins-update.c
+++ b/app/xdg-app-builtins-update.c
@@ -78,9 +78,7 @@ do_update (XdgAppDir* dir,
g_autofree char *ref = NULL;
g_autofree char *repository = NULL;
g_auto(GStrv) subpaths = NULL;
- gboolean was_updated = FALSE;
gboolean is_app;
- g_auto(GLnxLockFile) lock = GLNX_LOCK_FILE_INIT;
ref = xdg_app_dir_find_installed_ref (dir,
name,
@@ -108,28 +106,7 @@ do_update (XdgAppDir* dir,
if (!opt_no_deploy)
{
- if (!xdg_app_dir_lock (dir, &lock,
- cancellable, error))
- return FALSE;
-
- if (!xdg_app_dir_deploy_update (dir, ref, opt_commit, &was_updated, cancellable, error))
- return FALSE;
-
- if (was_updated && is_app)
- {
- if (!xdg_app_dir_update_exports (dir, name, cancellable, error))
- return FALSE;
- }
-
- glnx_release_lock_file (&lock);
- }
-
- if (was_updated)
- {
- if (!xdg_app_dir_prune (dir, cancellable, error))
- return FALSE;
-
- if (!xdg_app_dir_mark_changed (dir, error))
+ if (!xdg_app_dir_deploy_update (dir, ref, opt_commit, cancellable, error))
return FALSE;
}