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).
This commit is contained in:
Alexander Larsson
2020-06-30 12:44:26 +02:00
committed by Alexander Larsson
parent 8e631f120b
commit 6168fb2e79

View File

@@ -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;