diff options
author | Richard Hughes <richard@hughsie.com> | 2014-06-19 17:20:38 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2014-06-19 18:23:41 +0100 |
commit | b8dd29212a30efc71e490e821d7a2d9266ed88c2 (patch) | |
tree | 4171045994d08e0ae02979bd860ecc04fc637cc8 /libappstream-builder/plugins/asb-plugin-hardcoded.c | |
parent | 45602f0e77a25a62b3af5e1b4c7a0cd815e54415 (diff) | |
download | appstream-glib-b8dd29212a30efc71e490e821d7a2d9266ed88c2.tar.gz |
Do not write X-Kudo-RecentRelease for new versions of the metadata
Software centers can trivially work this out, e.g. something like:
https://git.gnome.org/browse/gnome-software/commit/?id=ad6c09c2eadb903151f3eb14a3962da160795dad
Diffstat (limited to 'libappstream-builder/plugins/asb-plugin-hardcoded.c')
-rw-r--r-- | libappstream-builder/plugins/asb-plugin-hardcoded.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/libappstream-builder/plugins/asb-plugin-hardcoded.c b/libappstream-builder/plugins/asb-plugin-hardcoded.c index 5443875..ba42dce 100644 --- a/libappstream-builder/plugins/asb-plugin-hardcoded.c +++ b/libappstream-builder/plugins/asb-plugin-hardcoded.c @@ -261,15 +261,17 @@ asb_plugin_process_app (AsbPlugin *plugin, /* has the application been updated in the last year */ releases = as_app_get_releases (AS_APP (app)); - for (i = 0; i < releases->len; i++) { - release = g_ptr_array_index (releases, i); - secs = (g_get_real_time () / G_USEC_PER_SEC) - - as_release_get_timestamp (release); - days = secs / (60 * 60 * 24); - if (days < 365) { - as_app_add_metadata (AS_APP (app), - "X-Kudo-RecentRelease", "", -1); - break; + if (asb_context_get_api_version (plugin->ctx) <= 0.8) { + for (i = 0; i < releases->len; i++) { + release = g_ptr_array_index (releases, i); + secs = (g_get_real_time () / G_USEC_PER_SEC) - + as_release_get_timestamp (release); + days = secs / (60 * 60 * 24); + if (days < 365) { + as_app_add_metadata (AS_APP (app), + "X-Kudo-RecentRelease", "", -1); + break; + } } } |