summaryrefslogtreecommitdiff
path: root/libappstream-builder/plugins/asb-plugin-hardcoded.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2014-06-19 17:20:38 +0100
committerRichard Hughes <richard@hughsie.com>2014-06-19 18:23:41 +0100
commitb8dd29212a30efc71e490e821d7a2d9266ed88c2 (patch)
tree4171045994d08e0ae02979bd860ecc04fc637cc8 /libappstream-builder/plugins/asb-plugin-hardcoded.c
parent45602f0e77a25a62b3af5e1b4c7a0cd815e54415 (diff)
downloadappstream-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.c20
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;
+ }
}
}