[gnome-software/wip/hughsie/more-strict-system-appstream: 2/2] Only use system appstream information when refining generic apps or packages.
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/hughsie/more-strict-system-appstream: 2/2] Only use system appstream information when refining generic apps or packages.
- Date: Mon, 8 Oct 2018 09:02:38 +0000 (UTC)
commit db3334f1ba550665a0d3cb99435809724ef3a7a1
Author: Richard Hughes <richard hughsie com>
Date: Mon Oct 8 09:53:54 2018 +0100
Only use system appstream information when refining generic apps or packages.
This speeds up returning results as the store is not searched for components
for all bundle kinds.
plugins/core/gs-plugin-appstream.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
index 16e9b735..88c55c55 100644
--- a/plugins/core/gs-plugin-appstream.c
+++ b/plugins/core/gs-plugin-appstream.c
@@ -517,6 +517,13 @@ gs_plugin_refine_app (GsPlugin *plugin,
{
gboolean found = FALSE;
+ /* not us */
+ if (gs_app_get_bundle_kind (app) != AS_BUNDLE_KIND_PACKAGE &&
+ gs_app_get_bundle_kind (app) != AS_BUNDLE_KIND_UNKNOWN) {
+ g_debug ("not a package, ignoring");
+ return TRUE;
+ }
+
/* find by ID then package name */
if (!gs_plugin_refine_from_id (plugin, app, &found, error))
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]