From 83fb8d95f4e53a667443c5445ad18238b57f0ef2 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 16 Jun 2017 17:12:44 +0100 Subject: [PATCH] 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. --- src/fu-main.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/fu-main.c b/src/fu-main.c index c868122fd..b23d2cec2 100644 --- a/src/fu-main.c +++ b/src/fu-main.c @@ -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,