mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-09 04:20:05 +00:00
trivial: Show results when using FWUPD_XMLB_VERBOSE
This commit is contained in:
parent
1ef67c60ca
commit
45673e7d9f
@ -14,7 +14,7 @@ with a non-standard filesystem layout.
|
|||||||
* `FWUPD_DEVICE_TESTS_BASE_URI` sets the base URI when downloading firmware for the device-tests
|
* `FWUPD_DEVICE_TESTS_BASE_URI` sets the base URI when downloading firmware for the device-tests
|
||||||
* `FWUPD_SUPPORTED` overrides the `-Dsupported_build` meson option at runtime
|
* `FWUPD_SUPPORTED` overrides the `-Dsupported_build` meson option at runtime
|
||||||
* `FWUPD_VERBOSE` is set when running `--verbose`
|
* `FWUPD_VERBOSE` is set when running `--verbose`
|
||||||
* `FWUPD_XMLB_VERBOSE` can be set to show Xmlb silo regeneration
|
* `FWUPD_XMLB_VERBOSE` can be set to show Xmlb silo regeneration and quirk matches
|
||||||
* `FWUPD_DOWNLOAD_VERBOSE` can be used to show wget or curl output
|
* `FWUPD_DOWNLOAD_VERBOSE` can be used to show wget or curl output
|
||||||
* standard glibc variables like `LANG` are also honored for CLI tools that are translated
|
* standard glibc variables like `LANG` are also honored for CLI tools that are translated
|
||||||
* libcurl respects the session proxy, e.g. `http_proxy`, `all_proxy`, `sftp_proxy` and `no_proxy`
|
* libcurl respects the session proxy, e.g. `http_proxy`, `all_proxy`, `sftp_proxy` and `no_proxy`
|
||||||
|
@ -56,6 +56,7 @@ struct _FuQuirks {
|
|||||||
XbSilo *silo;
|
XbSilo *silo;
|
||||||
XbQuery *query_kv;
|
XbQuery *query_kv;
|
||||||
XbQuery *query_vs;
|
XbQuery *query_vs;
|
||||||
|
gboolean verbose;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(FuQuirks, fu_quirks, G_TYPE_OBJECT)
|
G_DEFINE_TYPE(FuQuirks, fu_quirks, G_TYPE_OBJECT)
|
||||||
@ -430,6 +431,8 @@ fu_quirks_lookup_by_id(FuQuirks *self, const gchar *guid, const gchar *key)
|
|||||||
g_warning("failed to query: %s", error->message);
|
g_warning("failed to query: %s", error->message);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
if (self->verbose)
|
||||||
|
g_debug("%s:%s → %s", guid, key, xb_node_get_text(n));
|
||||||
return xb_node_get_text(n);
|
return xb_node_get_text(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -495,6 +498,8 @@ fu_quirks_lookup_by_id_iter(FuQuirks *self,
|
|||||||
}
|
}
|
||||||
for (guint i = 0; i < results->len; i++) {
|
for (guint i = 0; i < results->len; i++) {
|
||||||
XbNode *n = g_ptr_array_index(results, i);
|
XbNode *n = g_ptr_array_index(results, i);
|
||||||
|
if (self->verbose)
|
||||||
|
g_debug("%s → %s", guid, xb_node_get_text(n));
|
||||||
iter_cb(self, xb_node_get_attr(n, "key"), xb_node_get_text(n), user_data);
|
iter_cb(self, xb_node_get_attr(n, "key"), xb_node_get_text(n), user_data);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -518,6 +523,7 @@ fu_quirks_load(FuQuirks *self, FuQuirksLoadFlags load_flags, GError **error)
|
|||||||
g_return_val_if_fail(FU_IS_QUIRKS(self), FALSE);
|
g_return_val_if_fail(FU_IS_QUIRKS(self), FALSE);
|
||||||
g_return_val_if_fail(error == NULL || *error == NULL, FALSE);
|
g_return_val_if_fail(error == NULL || *error == NULL, FALSE);
|
||||||
self->load_flags = load_flags;
|
self->load_flags = load_flags;
|
||||||
|
self->verbose = g_getenv("FWUPD_XMLB_VERBOSE") != NULL;
|
||||||
return fu_quirks_check_silo(self, error);
|
return fu_quirks_check_silo(self, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user