[gnome-software] trivial: Set the management plugin and source for all bundle formats



commit 5504734785c2c8bd19c9effd73cb79074c2e5221
Author: Richard Hughes <richard hughsie com>
Date:   Tue May 17 12:00:14 2016 +0100

    trivial: Set the management plugin and source for all bundle formats

 src/plugins/gs-appstream.c |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/src/plugins/gs-appstream.c b/src/plugins/gs-appstream.c
index 763e283..896e155 100644
--- a/src/plugins/gs-appstream.c
+++ b/src/plugins/gs-appstream.c
@@ -293,11 +293,14 @@ gs_refine_item_management_plugin (GsApp *app, AsApp *item)
        bundles = as_app_get_bundles (item);
        for (i = 0; i < bundles->len; i++) {
                AsBundle *bundle = g_ptr_array_index (bundles, i);
-               if (as_bundle_get_kind (bundle) == AS_BUNDLE_KIND_XDG_APP) {
-                       gs_app_set_management_plugin (app, "xdg-app");
-                       gs_app_add_source (app, as_bundle_get_id (bundle));
+               AsBundleKind kind = as_bundle_get_kind (bundle);
 
-                       /* automatically add runtime */
+               /* common to all bundle formats */
+               gs_app_set_management_plugin (app, as_bundle_kind_to_string (kind));
+               gs_app_add_source (app, as_bundle_get_id (bundle));
+
+               /* automatically add runtime */
+               if (kind == AS_BUNDLE_KIND_XDG_APP) {
                        runtime = as_bundle_get_runtime (bundle);
                        if (runtime != NULL) {
                                g_autoptr(GsApp) app2 = NULL;
@@ -310,11 +313,6 @@ gs_refine_item_management_plugin (GsApp *app, AsApp *item)
                        }
                        break;
                }
-               if (as_bundle_get_kind (bundle) == AS_BUNDLE_KIND_LIMBA) {
-                       gs_app_set_management_plugin (app, "limba");
-                       gs_app_add_source (app, as_bundle_get_id (bundle));
-                       break;
-               }
        }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]