diff options
author | Richard Hughes <richard@hughsie.com> | 2015-10-27 10:45:00 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2015-10-27 10:45:02 +0000 |
commit | a7e9b83b4fb31d3ead235004c9097b300e3fa4df (patch) | |
tree | e8d870b2af74214cad7e316872ec0e9e9ba0515c /libappstream-glib/as-app-inf.c | |
parent | 973119c56488ab679f093ce7c2e99b4d06acc3e0 (diff) | |
download | appstream-glib-a7e9b83b4fb31d3ead235004c9097b300e3fa4df.tar.gz |
Do not attempt to parse the version in as_release_set_version()
We only need this in one specific case (from .inf files) and trying to parse
all the random version numbers in the Fedora package archive was causing
regressions in the builder output.
Diffstat (limited to 'libappstream-glib/as-app-inf.c')
-rw-r--r-- | libappstream-glib/as-app-inf.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libappstream-glib/as-app-inf.c b/libappstream-glib/as-app-inf.c index 18258a0..3aa98ee 100644 --- a/libappstream-glib/as-app-inf.c +++ b/libappstream-glib/as-app-inf.c @@ -24,6 +24,7 @@ #include "as-app-private.h" #include "as-inf.h" +#include "as-utils-private.h" #define AS_APP_INF_CLASS_GUID_FIRMWARE "f2e7dd72-6468-4e36-b6f1-6488f42c1b52" @@ -72,6 +73,7 @@ as_app_parse_inf_file (AsApp *app, g_autofree gchar *srcpkg = NULL; g_autofree gchar *vendor = NULL; g_autofree gchar *version = NULL; + g_autofree gchar *version_parsed = NULL; g_autoptr(GKeyFile) kf = NULL; g_autoptr(AsChecksum) csum = NULL; g_autoptr(AsIcon) icon = NULL; @@ -154,6 +156,9 @@ as_app_parse_inf_file (AsApp *app, return FALSE; } + /* convert if required */ + version_parsed = as_utils_version_parse (version); + /* add the GUID as a provide */ provide_guid = as_app_parse_inf_sanitize_guid (guid); if (provide_guid != NULL) { @@ -230,7 +235,7 @@ as_app_parse_inf_file (AsApp *app, /* add a release with no real description */ release = as_release_new (); - as_release_set_version (release, version); + as_release_set_version (release, version_parsed); as_release_set_timestamp (release, timestamp); csum = as_checksum_new (); as_checksum_set_filename (csum, firmware_basename); |