diff options
author | Richard Hughes <richard@hughsie.com> | 2018-02-21 13:14:51 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2018-02-21 13:14:53 +0000 |
commit | c688b5e0a66927907ed3e1f8c4b6acbfa2c60374 (patch) | |
tree | 272bd0de8c40347e768ec651375fff7ff7768e03 /libappstream-glib/as-app-validate.c | |
parent | 92487d5e9e3cb01233d2bb7267c4071f3ac953e3 (diff) | |
download | appstream-glib-c688b5e0a66927907ed3e1f8c4b6acbfa2c60374.tar.gz |
Do not fail to validate if the timestamps are out of order
If we use the same metainfo.xml file for unstable and stable releases we can't
sort by 'version' *and* 'timestamp'. Pick the former so versions from the same
branch can be grouped together.
Fixes https://github.com/hughsie/appstream-glib/issues/222
Diffstat (limited to 'libappstream-glib/as-app-validate.c')
-rw-r--r-- | libappstream-glib/as-app-validate.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/libappstream-glib/as-app-validate.c b/libappstream-glib/as-app-validate.c index 70c4920..efb76a2 100644 --- a/libappstream-glib/as-app-validate.c +++ b/libappstream-glib/as-app-validate.c @@ -953,26 +953,6 @@ as_app_validate_releases (AsApp *app, AsAppValidateHelper *helper, GError **erro } } - /* check the timestamps go down each time */ - if (releases->len > 1) { - AsRelease *release_old = g_ptr_array_index (releases, 0); - for (guint i = 1; i < releases->len; i++) { - AsRelease *release = g_ptr_array_index (releases, i); - guint64 timestamp = as_release_get_timestamp (release); - guint64 timestamp_old = as_release_get_timestamp (release_old); - if (timestamp == 0 || timestamp_old == 0) - continue; - if (timestamp > timestamp_old) { - ai_app_validate_add (helper, - AS_PROBLEM_KIND_TAG_INVALID, - "<release> timestamps are not in order " - "[%" G_GUINT64_FORMAT " before %" G_GUINT64_FORMAT "]", - timestamp_old, timestamp); - } - release_old = release; - } - } - return TRUE; } |