transactions: Request tokens after detecting which ops are no-ops

This commit is contained in:
Alexander Larsson
2020-06-30 12:34:19 +02:00
committed by Alexander Larsson
parent bc05023d70
commit bd992715dc

View File

@@ -3979,10 +3979,6 @@ flatpak_transaction_real_run (FlatpakTransaction *self,
if (!resolve_all_ops (self, cancellable, error))
return FALSE;
/* Ensure we have all required tokens */
if (!request_required_tokens (self, NULL, cancellable, error))
return FALSE;
sort_ops (self);
/* Ensure the operation kind is normalized and not no-op */
@@ -4020,6 +4016,10 @@ flatpak_transaction_real_run (FlatpakTransaction *self,
}
}
/* Ensure we have all required tokens */
if (!request_required_tokens (self, NULL, cancellable, error))
return FALSE;
g_signal_emit (self, signals[READY], 0, &ready_res);
if (!ready_res)