From 0ae6299f282f83626b63b3f34fecd9633833bef2 Mon Sep 17 00:00:00 2001 From: Mario Sanchez Prada Date: Wed, 23 May 2018 15:10:32 +0100 Subject: [PATCH] lib/installation: Always prune on updating unless the NO_PULL flag is set The current condition being checked to decide when to prune after updating a flatpak from the public API is probably not the best one, since NO_DEPLOY doesn't imply that prunable objects will be available, as that's something that depends on whether a pull operation is performed, not a deployment. So, change that condition so that we now always prune after updating unless a NO_PULL flag has been explicitly set, which means that no prunable objects would be available and so it's safe to ignore that step. https://github.com/flatpak/flatpak/issues/1703 Closes: #1704 Approved by: alexlarsson --- lib/flatpak-installation.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/flatpak-installation.c b/lib/flatpak-installation.c index e861f124c..35dc72322 100644 --- a/lib/flatpak-installation.c +++ b/lib/flatpak-installation.c @@ -1897,7 +1897,8 @@ flatpak_installation_update_full (FlatpakInstallation *self, if (result == NULL) goto out; - if ((flags & FLATPAK_UPDATE_FLAGS_NO_DEPLOY) != 0) + /* We don't get prunable objects if not pulling */ + if (!(flags & FLATPAK_UPDATE_FLAGS_NO_PULL)) flatpak_dir_prune (dir_clone, cancellable, NULL); out: