diff --git a/src/fu-main.c b/src/fu-main.c index 738b73c94..c1130f4a6 100644 --- a/src/fu-main.c +++ b/src/fu-main.c @@ -572,6 +572,23 @@ fu_main_get_action_id_for_device (FuMainAuthHelper *helper) return "org.freedesktop.fwupd.update-internal"; } +/** + * _as_store_set_priority: + **/ +static void +_as_store_set_priority (AsStore *store, gint priority) +{ + AsApp *app; + GPtrArray *apps; + guint i; + + apps = as_store_get_apps (store); + for (i = 0; i < apps->len; i++) { + app = g_ptr_array_index (apps, i); + as_app_set_priority (app, priority); + } +} + /** * fu_main_daemon_update_metadata: * @@ -599,6 +616,8 @@ fu_main_daemon_update_metadata (gint fd, gint fd_sig, GError **error) if (g_file_query_exists (file, NULL)) { if (!as_store_from_file (store, file, NULL, NULL, error)) return FALSE; + /* ensure we don't merge existing entries */ + _as_store_set_priority (store, -1); } /* read the entire file into memory */