From 7cd80fb185c089b1740ed2572f117566d1b665fb Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Thu, 25 Aug 2016 14:19:12 +0100 Subject: trivial: Don't show some applications as installed when they are not Only deduplicate AppStream::AppData when the appdata file has system scope. --- libappstream-glib/as-store.c | 6 ++++-- 1 file 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), -- cgit v1.2.1