From 91eda8919e06d6d7752a522e4161fb7d2611cbed Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 21 Apr 2016 20:19:01 +0200 Subject: common: Move duplicated code into xdg_app_dir_deploy_update --- app/xdg-app-builtins-update.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'app') 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; } -- cgit v1.2.1