mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-04 19:11:07 +00:00
Do not merge existing LVFS metadata
If we change the filenames or hash values we don't want duplicate locations.
This commit is contained in:
parent
0b8d461099
commit
2b60a33c8f
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user