mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-05 23:19:50 +00:00
trivial: Allow firmware files to select a quad version format
This can be used to select the AA.BB.CC.DD format rather than the default AA.BB.CCDD format for firmware versions. This allows us to support new vendor requirements without adding more complicated rules to the quirk file.
This commit is contained in:
parent
8bda7ccae8
commit
61ac08d6d5
@ -965,6 +965,7 @@ fu_engine_vendor_quirk_release_version (FuEngine *self, AsApp *app)
|
||||
AsVersionParseFlag flags = AS_VERSION_PARSE_FLAG_USE_TRIPLET;
|
||||
GPtrArray *releases;
|
||||
const gchar *quirk;
|
||||
const gchar *version_format;
|
||||
|
||||
/* no quirk required */
|
||||
if (as_app_get_kind (app) != AS_APP_KIND_FIRMWARE)
|
||||
@ -977,6 +978,11 @@ fu_engine_vendor_quirk_release_version (FuEngine *self, AsApp *app)
|
||||
if (g_strcmp0 (quirk, "none") == 0)
|
||||
flags = AS_VERSION_PARSE_FLAG_NONE;
|
||||
|
||||
/* specified in metadata */
|
||||
version_format = as_app_get_metadata_item (app, "LVFS::VersionFormat");
|
||||
if (g_strcmp0 (version_format, "quad") == 0)
|
||||
flags = AS_VERSION_PARSE_FLAG_NONE;
|
||||
|
||||
/* fix each release */
|
||||
releases = as_app_get_releases (app);
|
||||
for (guint i = 0; i < releases->len; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user