[gnome-software/mwleeds/fix-deprecated-install] fixup! flatpak: Migrate flatpakref handling to FlatpakTransaction
- From: Phaedrus Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/mwleeds/fix-deprecated-install] fixup! flatpak: Migrate flatpakref handling to FlatpakTransaction
- Date: Mon, 11 Oct 2021 22:27:16 +0000 (UTC)
commit a62bf70bc38a714edce7031ab271caa1254c2357
Author: Phaedrus Leeds <mwleeds protonmail com>
Date: Mon Oct 11 15:27:09 2021 -0700
fixup! flatpak: Migrate flatpakref handling to FlatpakTransaction
plugins/flatpak/gs-flatpak.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index 79e3999ad..21477d3c5 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -3439,11 +3439,21 @@ gs_flatpak_file_to_app_bundle (GsFlatpak *self,
}
static gboolean
-_abort_on_txn_ready (FlatpakTransaction *transaction)
+_txn_abort_on_ready (FlatpakTransaction *transaction)
{
return FALSE;
}
+static gboolean
+_txn_add_new_remote (FlatpakTransaction *transaction,
+ FlatpakTransactionRemoteReason reason,
+ const char *from_id,
+ const char *remote_name,
+ const char *url)
+{
+ return TRUE;
+}
+
GsApp *
gs_flatpak_file_to_app_ref (GsFlatpak *self,
GFile *file,
@@ -3534,7 +3544,8 @@ gs_flatpak_file_to_app_ref (GsFlatpak *self,
return NULL;
}
flatpak_transaction_set_no_interaction (transaction, TRUE);
- g_signal_connect (transaction, "ready", G_CALLBACK (_abort_on_txn_ready), NULL);
+ g_signal_connect (transaction, "ready", G_CALLBACK (_txn_abort_on_ready), NULL);
+ g_signal_connect (transaction, "add-new-remote", G_CALLBACK (_txn_add_new_remote), NULL);
ref_file_data = g_bytes_new (contents, len);
if (!flatpak_transaction_add_install_flatpakref (transaction, ref_file_data, error)) {
gs_flatpak_error_convert (error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]