[gnome-software/wip/hughsie/more-strict-system-appstream: 1/2] trivial: Set the bundle kind on more GsApp instances
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/hughsie/more-strict-system-appstream: 1/2] trivial: Set the bundle kind on more GsApp instances
- Date: Mon, 8 Oct 2018 09:02:33 +0000 (UTC)
commit dac5e65ae1070c22be000f48181aea3c7a425bc1
Author: Richard Hughes <richard hughsie com>
Date: Mon Oct 8 09:52:41 2018 +0100
trivial: Set the bundle kind on more GsApp instances
No behaviour change, just correctness.
plugins/dpkg/gs-plugin-dpkg.c | 1 +
plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c | 1 +
plugins/fwupd/gs-plugin-fwupd.c | 1 +
plugins/packagekit/gs-plugin-packagekit-history.c | 1 +
plugins/packagekit/gs-plugin-packagekit-local.c | 1 +
plugins/packagekit/gs-plugin-packagekit-offline.c | 2 ++
plugins/packagekit/gs-plugin-packagekit-url-to-app.c | 1 +
plugins/packagekit/gs-plugin-packagekit.c | 1 +
plugins/packagekit/packagekit-common.c | 1 +
plugins/snap/gs-plugin-snap.c | 1 +
10 files changed, 11 insertions(+)
---
diff --git a/plugins/dpkg/gs-plugin-dpkg.c b/plugins/dpkg/gs-plugin-dpkg.c
index edf77c0f..2a36f0c9 100644
--- a/plugins/dpkg/gs-plugin-dpkg.c
+++ b/plugins/dpkg/gs-plugin-dpkg.c
@@ -98,6 +98,7 @@ gs_plugin_file_to_app (GsPlugin *plugin,
gs_app_set_url (app, AS_URL_KIND_HOMEPAGE, tokens[3]);
gs_app_set_summary (app, GS_APP_QUALITY_LOWEST, tokens[4]);
gs_app_set_kind (app, AS_APP_KIND_GENERIC);
+ gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
gs_app_set_metadata (app, "GnomeSoftware::Creator",
gs_plugin_get_name (plugin));
diff --git a/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c
b/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c
index 6afd088c..47a7ba08 100644
--- a/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c
+++ b/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c
@@ -300,6 +300,7 @@ _create_upgrade_from_info (GsPlugin *plugin, PkgdbItem *item)
app = gs_app_new ("org.fedoraproject.Fedora");
gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
gs_app_set_kind (app, AS_APP_KIND_OS_UPGRADE);
+ gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
gs_app_set_name (app, GS_APP_QUALITY_LOWEST, item->name);
gs_app_set_summary (app, GS_APP_QUALITY_LOWEST,
/* TRANSLATORS: this is a title for Fedora distro upgrades */
diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
index e7b86778..216cf2fd 100644
--- a/plugins/fwupd/gs-plugin-fwupd.c
+++ b/plugins/fwupd/gs-plugin-fwupd.c
@@ -282,6 +282,7 @@ gs_plugin_fwupd_new_app_from_device (GsPlugin *plugin, FwupdDevice *dev)
/* default stuff */
gs_app_set_kind (app, AS_APP_KIND_FIRMWARE);
+ gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_CABINET);
gs_app_add_quirk (app, AS_APP_QUIRK_NOT_LAUNCHABLE);
gs_app_set_management_plugin (app, "fwupd");
gs_app_add_category (app, "System");
diff --git a/plugins/packagekit/gs-plugin-packagekit-history.c
b/plugins/packagekit/gs-plugin-packagekit-history.c
index dd7f5334..22abc429 100644
--- a/plugins/packagekit/gs-plugin-packagekit-history.c
+++ b/plugins/packagekit/gs-plugin-packagekit-history.c
@@ -69,6 +69,7 @@ gs_plugin_packagekit_refine_add_history (GsApp *app, GVariant *dict)
/* create new history item with same ID as parent */
history = gs_app_new (gs_app_get_id (app));
gs_app_set_kind (history, AS_APP_KIND_GENERIC);
+ gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
gs_app_set_name (history, GS_APP_QUALITY_NORMAL, gs_app_get_name (app));
/* get the installed state */
diff --git a/plugins/packagekit/gs-plugin-packagekit-local.c b/plugins/packagekit/gs-plugin-packagekit-local.c
index 497f116a..63e3e7a9 100644
--- a/plugins/packagekit/gs-plugin-packagekit-local.c
+++ b/plugins/packagekit/gs-plugin-packagekit-local.c
@@ -206,6 +206,7 @@ gs_plugin_file_to_app (GsPlugin *plugin,
basename = g_path_get_basename (filename);
gs_app_set_management_plugin (app, "packagekit");
gs_app_set_kind (app, AS_APP_KIND_GENERIC);
+ gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
gs_app_set_state (app, AS_APP_STATE_AVAILABLE_LOCAL);
gs_app_set_name (app, GS_APP_QUALITY_LOWEST, split[PK_PACKAGE_ID_NAME]);
gs_app_set_summary (app, GS_APP_QUALITY_LOWEST,
diff --git a/plugins/packagekit/gs-plugin-packagekit-offline.c
b/plugins/packagekit/gs-plugin-packagekit-offline.c
index 31615d34..b4904f4d 100644
--- a/plugins/packagekit/gs-plugin-packagekit-offline.c
+++ b/plugins/packagekit/gs-plugin-packagekit-offline.c
@@ -157,6 +157,7 @@ gs_plugin_add_updates_historical (GsPlugin *plugin,
gs_app_add_quirk (app, AS_APP_QUIRK_MATCH_ANY_PREFIX);
gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
gs_app_set_kind (app, AS_APP_KIND_OS_UPGRADE);
+ gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
gs_app_set_install_date (app, mtime);
gs_app_set_metadata (app, "GnomeSoftware::Creator",
gs_plugin_get_name (plugin));
@@ -184,6 +185,7 @@ gs_plugin_add_updates_historical (GsPlugin *plugin,
gs_app_add_source_id (app, package_id);
gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
gs_app_set_kind (app, AS_APP_KIND_GENERIC);
+ gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
gs_app_set_install_date (app, mtime);
gs_app_set_metadata (app, "GnomeSoftware::Creator",
gs_plugin_get_name (plugin));
diff --git a/plugins/packagekit/gs-plugin-packagekit-url-to-app.c
b/plugins/packagekit/gs-plugin-packagekit-url-to-app.c
index 7afb082b..20a1d9e7 100644
--- a/plugins/packagekit/gs-plugin-packagekit-url-to-app.c
+++ b/plugins/packagekit/gs-plugin-packagekit-url-to-app.c
@@ -91,6 +91,7 @@ gs_plugin_url_to_app (GsPlugin *plugin,
gs_plugin_packagekit_set_packaging_format (plugin, app);
gs_app_add_source (app, path);
gs_app_set_kind (app, AS_APP_KIND_GENERIC);
+ gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
package_ids = g_new0 (gchar *, 2);
package_ids[0] = g_strdup (path);
diff --git a/plugins/packagekit/gs-plugin-packagekit.c b/plugins/packagekit/gs-plugin-packagekit.c
index 57ae426c..e452142a 100644
--- a/plugins/packagekit/gs-plugin-packagekit.c
+++ b/plugins/packagekit/gs-plugin-packagekit.c
@@ -157,6 +157,7 @@ gs_plugin_add_sources (GsPlugin *plugin,
app = gs_app_new (id);
gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
gs_app_set_kind (app, AS_APP_KIND_SOURCE);
+ gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
gs_app_add_quirk (app, AS_APP_QUIRK_NOT_LAUNCHABLE);
gs_app_set_state (app, pk_repo_detail_get_enabled (rd) ?
AS_APP_STATE_INSTALLED : AS_APP_STATE_AVAILABLE);
diff --git a/plugins/packagekit/packagekit-common.c b/plugins/packagekit/packagekit-common.c
index 64c2a599..2a5f8710 100644
--- a/plugins/packagekit/packagekit-common.c
+++ b/plugins/packagekit/packagekit-common.c
@@ -294,6 +294,7 @@ gs_plugin_packagekit_add_results (GsPlugin *plugin,
pk_info_enum_to_string (pk_package_get_info (package)));
}
gs_app_set_kind (app, AS_APP_KIND_GENERIC);
+ gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
gs_app_list_add (list, app);
}
return TRUE;
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index 8d09b687..1ee9937b 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -306,6 +306,7 @@ snap_to_app (GsPlugin *plugin, SnapdSnap *snap)
if (app == NULL) {
app = gs_app_new (NULL);
gs_app_set_from_unique_id (app, unique_id);
+ gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_SNAP);
gs_app_set_metadata (app, "snap::name", snapd_snap_get_name (snap));
gs_plugin_cache_add (plugin, unique_id, app);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]