mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-10-03 23:38:25 +00:00
When using verify's -m option, it generally only makes sense to verify a build within the same format, since the subsequent format (if any) might not be compatible. Therefore, we should disallow verifying to a build with a different format by default. This commit adds the proper enforcement by making this condition a fatal error. The early exit can be bypassed using the -x/--force option, which will print a warning message instead. For now, this compatibility check is targeting the use case of verifying to a newer build, so I also report the latest supported build for the current format. Verifying to an older build is not guaranteed to succeed at present, and swupd-client does not yet understand the version/formatN/first file. In other words, reporting to the user the oldest build they can verify to will be a future improvement. Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>