Do not fall back to the default release when verifying

This is never going to be valid. What we want is to try and get a new AsApp and
AsRelease from the system store, not the verification store.
This commit is contained in:
Richard Hughes 2017-06-16 17:12:44 +01:00
parent 4a2e915e9a
commit 83fb8d95f4

View File

@ -2343,8 +2343,19 @@ fu_main_daemon_method_call (GDBusConnection *connection, const gchar *sender,
/* find version in metadata */
version = fu_device_get_version (item->device);
release = as_app_get_release (app, version);
if (release == NULL)
release = as_app_get_release_default (app);
if (release == NULL) {
/* try again with the system metadata */
app = fu_main_store_get_app_by_guids (priv->store, item->device);
if (app == NULL) {
g_set_error_literal (&error,
FWUPD_ERROR,
FWUPD_ERROR_NOT_FOUND,
"No system metadata");
fu_main_invocation_return_error (priv, invocation, error);
return;
}
release = as_app_get_release (app, version);
}
if (release == NULL) {
g_set_error (&error,
FWUPD_ERROR,