[gnome-software/wip/kalev/flatpak-default-dependency-sources] flatpak: Use system installations as dependency sources for user installations
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/kalev/flatpak-default-dependency-sources] flatpak: Use system installations as dependency sources for user installations
- Date: Wed, 2 Jan 2019 07:33:55 +0000 (UTC)
commit e754f064911faf6ad93d5fbfdae291b3dd47b2d1
Author: Kalev Lember <klember redhat com>
Date: Wed Jan 2 08:28:31 2019 +0100
flatpak: Use system installations as dependency sources for user installations
Instead of adding all installations as dependency sources for each
other, use flatpak_transaction_add_default_dependency_sources() API to
add system-wide installations as dependency sources for user
installations, but not the other way around.
Fixes: https://gitlab.gnome.org/GNOME/gnome-software/issues/564
plugins/flatpak/gs-plugin-flatpak.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c
index d83b2b3b..ed696400 100644
--- a/plugins/flatpak/gs-plugin-flatpak.c
+++ b/plugins/flatpak/gs-plugin-flatpak.c
@@ -420,7 +420,6 @@ static FlatpakTransaction *
_build_transaction (GsPlugin *plugin, GsFlatpak *flatpak,
GCancellable *cancellable, GError **error)
{
- GsPluginData *priv = gs_plugin_get_data (plugin);
FlatpakInstallation *installation;
g_autoptr(FlatpakTransaction) transaction = NULL;
@@ -437,14 +436,9 @@ _build_transaction (GsPlugin *plugin, GsFlatpak *flatpak,
g_signal_connect (transaction, "ref-to-app",
G_CALLBACK (_ref_to_app), plugin);
- /* add the counterpart installations */
- for (guint i = 0; i < priv->flatpaks->len; i++) {
- GsFlatpak *flatpak_tmp = g_ptr_array_index (priv->flatpaks, i);
- if (flatpak_tmp == flatpak)
- continue;
- installation = gs_flatpak_get_installation (flatpak_tmp);
- flatpak_transaction_add_dependency_source (transaction, installation);
- }
+ /* use system installations as dependency sources for user installations */
+ flatpak_transaction_add_default_dependency_sources (transaction);
+
return g_steal_pointer (&transaction);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]