[gnome-builder] flatpak: When parsing the manifest check for "id" and "app-id"
- From: Matthew Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] flatpak: When parsing the manifest check for "id" and "app-id"
- Date: Fri, 30 Dec 2016 00:55:21 +0000 (UTC)
commit 61cb21ebb9274546bb9fa211b88db9decf342224
Author: Simon Schampijer <simon schampijer endlessm com>
Date: Wed Dec 28 21:40:32 2016 +0100
flatpak: When parsing the manifest check for "id" and "app-id"
The specification allows for "id" and "app-id", and
the manifest that comes with the installation has
the "id" field set, so we need to support this as
well.
https://bugzilla.gnome.org/show_bug.cgi?id=776553
plugins/flatpak/gbp-flatpak-clone-widget.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/plugins/flatpak/gbp-flatpak-clone-widget.c b/plugins/flatpak/gbp-flatpak-clone-widget.c
index 2468585..9129ceb 100644
--- a/plugins/flatpak/gbp-flatpak-clone-widget.c
+++ b/plugins/flatpak/gbp-flatpak-clone-widget.c
@@ -471,7 +471,13 @@ get_source (GbpFlatpakCloneWidget *self,
root_node = json_parser_get_root (parser);
root_object = json_node_get_object (root_node);
- self->id = g_strdup (json_object_get_string_member (root_object, "app-id"));
+ if (json_object_has_member (root_object, "app-id"))
+ self->id = g_strdup (json_object_get_string_member (root_object, "app-id"));
+ else if (json_object_has_member (root_object, "id"))
+ self->id = g_strdup (json_object_get_string_member (root_object, "id"));
+
+ if (self->id == NULL)
+ return NULL;
modules = json_object_get_array_member (root_object, "modules");
num_modules = json_array_get_length (modules);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]