[gnome-software] fwupd: Don't show a critical warning with new versions of fwupd
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] fwupd: Don't show a critical warning with new versions of fwupd
- Date: Wed, 30 Aug 2017 14:38:37 +0000 (UTC)
commit ed5da304e15024e3bd5dff00be033bf488aaa22b
Author: Richard Hughes <richard hughsie com>
Date: Wed Aug 30 15:30:43 2017 +0100
fwupd: Don't show a critical warning with new versions of fwupd
plugins/fwupd/gs-plugin-fwupd.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
index 7f7e73b..c57bb63 100644
--- a/plugins/fwupd/gs-plugin-fwupd.c
+++ b/plugins/fwupd/gs-plugin-fwupd.c
@@ -760,6 +760,16 @@ gs_plugin_fwupd_refresh_remote (GsPlugin *plugin,
g_autoptr(GBytes) data = NULL;
g_autoptr(GsApp) app_dl = gs_app_new (gs_plugin_get_name (plugin));
+ /* sanity check */
+ if (fwupd_remote_get_filename_asc (remote) == NULL) {
+ g_set_error (error,
+ GS_PLUGIN_ERROR,
+ GS_PLUGIN_ERROR_FAILED,
+ "remote %s has no filename signature",
+ fwupd_remote_get_id (remote));
+ return FALSE;
+ }
+
/* check cache age */
filename_asc = gs_utils_get_cache_filename ("firmware",
fwupd_remote_get_filename_asc (remote),
@@ -876,6 +886,8 @@ gs_plugin_fwupd_refresh_remotes (GsPlugin *plugin,
FwupdRemote *remote = g_ptr_array_index (remotes, i);
if (!fwupd_remote_get_enabled (remote))
continue;
+ if (fwupd_remote_get_kind (remote) == FWUPD_REMOTE_KIND_LOCAL)
+ continue;
if (!gs_plugin_fwupd_refresh_remote (plugin, remote, cache_age,
cancellable, error))
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]