mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-09 02:48:38 +00:00
trivial: Fix fwupdmgr get-history if the firmware was not installed from the LVFS
If you install a local .cab file that's not available on the LVFS then none of the history for any devices is available.
This commit is contained in:
parent
ec14e4bdd0
commit
9fcd29f92e
@ -969,6 +969,7 @@ fu_util_get_history (FuUtilPrivate *priv, gchar **values, GError **error)
|
|||||||
FwupdRelease *rel;
|
FwupdRelease *rel;
|
||||||
const gchar *remote;
|
const gchar *remote;
|
||||||
GNode *child;
|
GNode *child;
|
||||||
|
g_autoptr(GError) error_local = NULL;
|
||||||
|
|
||||||
if (!fu_util_filter_device (priv, dev))
|
if (!fu_util_filter_device (priv, dev))
|
||||||
continue;
|
continue;
|
||||||
@ -986,9 +987,16 @@ fu_util_get_history (FuUtilPrivate *priv, gchar **values, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* try to lookup releases from client */
|
/* try to lookup releases from client */
|
||||||
rels = fwupd_client_get_releases (priv->client, fwupd_device_get_id (dev), NULL, error);
|
rels = fwupd_client_get_releases (priv->client,
|
||||||
if (rels == NULL)
|
fwupd_device_get_id (dev),
|
||||||
return FALSE;
|
NULL, &error_local);
|
||||||
|
if (rels == NULL) {
|
||||||
|
g_debug ("failed to get releases for %s: %s",
|
||||||
|
fwupd_device_get_id (dev),
|
||||||
|
error_local->message);
|
||||||
|
g_node_append_data (child, rel);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* map to a release in client */
|
/* map to a release in client */
|
||||||
for (guint j = 0; j < rels->len; j++) {
|
for (guint j = 0; j < rels->len; j++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user