From f647a5ea7907313d767f6ae8e6286105646bccca Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 3 Nov 2020 12:03:29 +0100 Subject: [PATCH] remote-modify: Clear cached summaries when the remote is modified. This fixed some issues in the test where changing the url cause the cache:ing to fail to update due to the mtimes being to new in combination with the HTTP If-Modified-Since use. --- common/flatpak-dir.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c index c38c9e6d..71ba8b63 100644 --- a/common/flatpak-dir.c +++ b/common/flatpak-dir.c @@ -14129,6 +14129,10 @@ flatpak_dir_modify_remote (FlatpakDir *self, cancellable, error)) return FALSE; + /* If we e.g. changed url or gpg config the cached summary may be invalid */ + if (!flatpak_dir_remote_clear_cached_summary (self, remote_name, cancellable, error)) + return FALSE; + return TRUE; } @@ -14199,6 +14203,10 @@ flatpak_dir_modify_remote (FlatpakDir *self, } } + /* If we e.g. changed url or gpg config the cached summary may be invalid */ + if (!flatpak_dir_remote_clear_cached_summary (self, remote_name, cancellable, error)) + return FALSE; + if (!flatpak_dir_mark_changed (self, error)) return FALSE;