summaryrefslogtreecommitdiff
path: root/client/as-util.c
diff options
context:
space:
mode:
authorCorentin Noël <corentin.noel@collabora.com>2021-08-02 16:49:27 +0200
committerRichard Hughes <richard@hughsie.com>2021-08-03 08:20:30 +0100
commitb2fafbca02219748fd84e3b96f1419030fd5c466 (patch)
tree8c3aab7f661958630cf8050d23b2af9197241e98 /client/as-util.c
parent60e85d47255a5a4423f4411532ff16554470a4dc (diff)
downloadappstream-glib-b2fafbca02219748fd84e3b96f1419030fd5c466.tar.gz
Consider AppStream version as a string
Always store the AppStream metadata version as a string and compare it like any other version. This allows to have 0.10 > 0.8 for instance.
Diffstat (limited to 'client/as-util.c')
-rw-r--r--client/as-util.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/client/as-util.c b/client/as-util.c
index 0aa4754..21621c4 100644
--- a/client/as-util.c
+++ b/client/as-util.c
@@ -482,8 +482,7 @@ as_util_convert_appstream (GFile *file_input,
if (!as_store_from_file (store, file_input, NULL, NULL, error))
return FALSE;
/* TRANSLATORS: information message */
- g_print ("%s: %.2f\n", _("Old API version"),
- as_store_get_api_version (store));
+ g_print (_("Old API version: %s\n"), as_store_get_version (store));
/* save file */
as_store_set_api_version (store, new_version);
@@ -494,7 +493,7 @@ as_util_convert_appstream (GFile *file_input,
NULL, error))
return FALSE;
/* TRANSLATORS: information message */
- g_print ("%s: %.2f\n", _("New API version"), as_store_get_api_version (store));
+ g_print (_("New API version: %s\n"), as_store_get_version (store));
return TRUE;
}