summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2020-06-30 12:44:26 +0200
committerAlexander Larsson <alexander.larsson@gmail.com>2020-06-30 16:13:51 +0200
commit4f139467c26155185845cc2b9abcfe3baa130366 (patch)
treec2b84081a0ef4630eca7357e3dbbb7735f9fcc79
parentd6ea3ab71190e58a98de07ea786adeeda63ed1be (diff)
downloadflatpak-4f139467c26155185845cc2b9abcfe3baa130366.tar.gz
transaction: Avoid authentication for no-op updates
Ensure we normalize ops before requesting authentication so we can trust the op->skip value to be set for no-op updates (which don't need authentication).
-rw-r--r--common/flatpak-transaction.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/flatpak-transaction.c b/common/flatpak-transaction.c
index e18dca86..f6660362 100644
--- a/common/flatpak-transaction.c
+++ b/common/flatpak-transaction.c
@@ -3306,6 +3306,9 @@ request_required_tokens (FlatpakTransaction *self,
GList *l;
g_autoptr(GHashTable) need_token_ht = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, (GDestroyNotify) g_list_free); /* remote name -> list of op */
+ /* Ensure all ops so far ar normalized so we don't request authentication for no-op updates */
+ flatpak_transaction_normalize_ops (self);
+
for (l = priv->ops; l != NULL; l = l->next)
{
FlatpakTransactionOperation *op = l->data;