summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-08-25 14:19:12 +0100
committerRichard Hughes <richard@hughsie.com>2016-08-25 14:56:58 +0100
commit7cd80fb185c089b1740ed2572f117566d1b665fb (patch)
tree7fa215a213e89b5e25133e4671d9b22107828a63
parentd0ebe1ee16a018575da1db056fdb128be95970e1 (diff)
downloadappstream-glib-7cd80fb185c089b1740ed2572f117566d1b665fb.tar.gz
trivial: Don't show some applications as installed when they are not
Only deduplicate AppStream::AppData when the appdata file has system scope.
-rw-r--r--libappstream-glib/as-store.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libappstream-glib/as-store.c b/libappstream-glib/as-store.c
index 5f72997..4cf0db8 100644
--- a/libappstream-glib/as-store.c
+++ b/libappstream-glib/as-store.c
@@ -1026,7 +1026,8 @@ as_store_add_app (AsStore *store, AsApp *app)
} else {
if (as_app_get_source_kind (app) == AS_APP_SOURCE_KIND_APPDATA &&
- as_app_get_source_kind (item) == AS_APP_SOURCE_KIND_APPSTREAM) {
+ as_app_get_source_kind (item) == AS_APP_SOURCE_KIND_APPSTREAM &&
+ as_app_get_scope (app) == AS_APP_SCOPE_SYSTEM) {
as_app_set_state (item, AS_APP_STATE_INSTALLED);
g_debug ("ignoring AppData entry as AppStream exists: %s:%s",
as_app_get_unique_id (app),
@@ -1034,7 +1035,8 @@ as_store_add_app (AsStore *store, AsApp *app)
return;
}
if (as_app_get_source_kind (app) == AS_APP_SOURCE_KIND_DESKTOP &&
- as_app_get_source_kind (item) == AS_APP_SOURCE_KIND_APPSTREAM) {
+ as_app_get_source_kind (item) == AS_APP_SOURCE_KIND_APPSTREAM &&
+ as_app_get_scope (app) == AS_APP_SCOPE_SYSTEM) {
as_app_set_state (item, AS_APP_STATE_INSTALLED);
g_debug ("ignoring desktop entry as AppStream exists: %s:%s",
as_app_get_unique_id (app),