[gnome-software] snap: Mark non-app snaps as runtimes
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] snap: Mark non-app snaps as runtimes
- Date: Wed, 28 Jun 2017 12:39:15 +0000 (UTC)
commit f072d54865a089213d485b9eb9bec72f48e01cf1
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Jun 28 13:36:50 2017 +0100
snap: Mark non-app snaps as runtimes
plugins/snap/gs-plugin-snap.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index d88cfc0..9430df4 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -178,7 +178,20 @@ snap_to_app (GsPlugin *plugin, SnapdSnap *snap)
/* create a unique ID for deduplication, TODO: branch? */
app = gs_app_new (snapd_snap_get_name (snap));
- gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
+ switch (snapd_snap_get_snap_type (snap)) {
+ case SNAPD_SNAP_TYPE_APP:
+ gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
+ break;
+ case SNAPD_SNAP_TYPE_KERNEL:
+ case SNAPD_SNAP_TYPE_GADGET:
+ case SNAPD_SNAP_TYPE_OS:
+ gs_app_set_kind (app, AS_APP_KIND_RUNTIME);
+ gs_app_add_quirk (app, AS_APP_QUIRK_NOT_LAUNCHABLE);
+ break;
+ default:
+ case SNAPD_SNAP_TYPE_UNKNOWN:
+ break;
+ }
gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_SNAP);
gs_app_set_management_plugin (app, "snap");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]