diff options
author | Alexander Larsson <alexl@redhat.com> | 2018-07-10 15:16:46 +0200 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-07-10 14:29:17 +0000 |
commit | a568740b20b5de9e9c3824b70b1a8bb0f43f6ab8 (patch) | |
tree | 350a53d0166fe9465e25c6f06d6683812e1c358d | |
parent | 35786c9529fe0b6ce11103ca8dbfd1316d236790 (diff) | |
download | flatpak-a568740b20b5de9e9c3824b70b1a8bb0f43f6ab8.tar.gz |
transaction: drop installation caches when needed
If a remote is added or modified in the cloned FlatpakDir
we also drop caches in the one in the installation.
Fixes #1882
Closes: #1883
Approved by: alexlarsson
-rw-r--r-- | common/flatpak-transaction.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/flatpak-transaction.c b/common/flatpak-transaction.c index 4b0aac0e..4229a487 100644 --- a/common/flatpak-transaction.c +++ b/common/flatpak-transaction.c @@ -1483,6 +1483,8 @@ flatpak_transaction_update_metadata (FlatpakTransaction *self, if (!flatpak_dir_recreate_repo (priv->dir, cancellable, error)) return FALSE; + flatpak_installation_drop_caches (priv->installation, NULL, NULL); + return TRUE; } @@ -1971,6 +1973,8 @@ handle_suggested_remote_name (FlatpakTransaction *self, GKeyFile *keyfile, GErro if (!flatpak_dir_recreate_repo (priv->dir, NULL, error)) return FALSE; + + flatpak_installation_drop_caches (priv->installation, NULL, NULL); } return TRUE; @@ -2061,6 +2065,8 @@ handle_runtime_repo_deps (FlatpakTransaction *self, const char *id, const char * if (!flatpak_dir_recreate_repo (priv->dir, NULL, error)) return FALSE; + + flatpak_installation_drop_caches (priv->installation, NULL, NULL); } return TRUE; @@ -2117,6 +2123,8 @@ flatpak_transaction_resolve_flatpakrefs (FlatpakTransaction *self, if (!flatpak_dir_recreate_repo (priv->dir, NULL, error)) return FALSE; + flatpak_installation_drop_caches (priv->installation, NULL, NULL); + if (!flatpak_transaction_add_install (self, remote, ref, NULL, error)) return FALSE; } @@ -2189,6 +2197,8 @@ flatpak_transaction_resolve_bundles (FlatpakTransaction *self, if (!flatpak_dir_recreate_repo (priv->dir, NULL, error)) return FALSE; + flatpak_installation_drop_caches (priv->installation, NULL, NULL); + if (!flatpak_transaction_add_ref (self, remote, ref, NULL, commit, FLATPAK_TRANSACTION_OPERATION_INSTALL_BUNDLE, data->file, metadata, error)) return FALSE; |