summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-08-23 14:42:33 +0100
committerRichard Hughes <richard@hughsie.com>2016-08-23 14:50:50 +0100
commit9b36119e1ed8ae7c2bec341143c343a9d73dcdd8 (patch)
treed12ddf01993388c8a8b3479c097d166a76560f44
parentd5b5703da3b0db81e750ded28e5e72abd2375739 (diff)
downloadappstream-glib-9b36119e1ed8ae7c2bec341143c343a9d73dcdd8.tar.gz
trivial: Restrict the bundle kind when parsing local files
This means we don't wildcard match against user non-package apps.
-rw-r--r--libappstream-glib/as-store.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libappstream-glib/as-store.c b/libappstream-glib/as-store.c
index b3bf57b..5f72997 100644
--- a/libappstream-glib/as-store.c
+++ b/libappstream-glib/as-store.c
@@ -2550,6 +2550,13 @@ as_store_load_installed (AsStore *store,
return FALSE;
}
+ /* don't match against non-package apps in the store */
+ if (scope == AS_APP_SCOPE_SYSTEM &&
+ g_str_has_prefix (path, "/usr/share")) {
+ as_app_set_trust_flags (app, AS_APP_TRUST_FLAG_COMPLETE);
+ as_app_add_pkgname (app, "");
+ }
+
/* set the ID prefix */
if ((priv->add_flags & AS_STORE_ADD_FLAG_USE_UNIQUE_ID) == 0)
as_store_fixup_id_prefix (app, as_app_scope_to_string (scope));