[gnome-software] trivial: Install the runtime before trying to install the flatpakref
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Install the runtime before trying to install the flatpakref
- Date: Wed, 8 Mar 2017 16:34:35 +0000 (UTC)
commit a02f5b33193b93bb336df26998da494c6345556e
Author: Richard Hughes <richard hughsie com>
Date: Wed Mar 8 15:28:52 2017 +0000
trivial: Install the runtime before trying to install the flatpakref
It seems install_ref_file doesn't check the availability of the runtime.
plugins/flatpak/gs-flatpak.c | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index 96aa875..59612e4 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -2571,16 +2571,6 @@ gs_flatpak_app_install (GsFlatpak *self,
gs_app_set_state_recover (app);
return FALSE;
}
- data = g_bytes_new (contents, len);
- xref2 = flatpak_installation_install_ref_file (self->installation,
- data,
- cancellable,
- error);
- if (xref2 == NULL) {
- gs_plugin_flatpak_error_convert (error);
- gs_app_set_state_recover (app);
- return FALSE;
- }
/* we have a missing remote and a RuntimeRef */
runtime = gs_app_get_runtime (app);
@@ -2660,6 +2650,18 @@ gs_flatpak_app_install (GsFlatpak *self,
return FALSE;
}
}
+
+ /* now install actual app */
+ data = g_bytes_new (contents, len);
+ xref2 = flatpak_installation_install_ref_file (self->installation,
+ data,
+ cancellable,
+ error);
+ if (xref2 == NULL) {
+ gs_plugin_flatpak_error_convert (error);
+ gs_app_set_state_recover (app);
+ return FALSE;
+ }
}
/* install required runtime if not already installed */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]