Allow specifying <firmware>GUID</firmware> to check any version exists

If the version is not specified then treat it as just 'exists'.
This commit is contained in:
Richard Hughes 2019-07-16 08:43:57 +01:00
parent 7b32e5f01f
commit aaf0ce788f

View File

@ -1096,7 +1096,8 @@ fu_engine_check_requirement_firmware (FuEngine *self, XbNode *req,
/* get the version of the other device */
version = fu_device_get_version (device2);
if (!fu_engine_require_vercmp (req, version, &error_local)) {
if (version != NULL &&
!fu_engine_require_vercmp (req, version, &error_local)) {
if (g_strcmp0 (xb_node_get_attr (req, "compare"), "ge") == 0) {
g_set_error (error,
FWUPD_ERROR,