summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-02-18 14:50:09 +0000
committerRichard Hughes <richard@hughsie.com>2016-02-18 14:50:17 +0000
commit98214efde466952c2b02987004ff3d0c241d8075 (patch)
treea01d095ff1c0de8081c0c53334e72b8924259a0b /client
parent5d3917a7dc84851b35d214e349d643e836bb4061 (diff)
downloadappstream-glib-98214efde466952c2b02987004ff3d0c241d8075.tar.gz
Remove the --api-version parameter from client tools
We're only support writing 0.6+ API these days and anything older than this is backwards compatible.
Diffstat (limited to 'client')
-rw-r--r--client/as-builder.c16
-rw-r--r--client/as-compose.c8
2 files changed, 2 insertions, 22 deletions
diff --git a/client/as-builder.c b/client/as-builder.c
index 8fe7b0f..17872da 100644
--- a/client/as-builder.c
+++ b/client/as-builder.c
@@ -72,7 +72,6 @@ main (int argc, char **argv)
gboolean ret;
gboolean uncompressed_icons = FALSE;
gboolean verbose = FALSE;
- gdouble api_version = 0.0f;
gint max_threads = 4;
gint min_icon_size = 32;
guint i;
@@ -140,9 +139,6 @@ main (int argc, char **argv)
{ "min-icon-size", '\0', 0, G_OPTION_ARG_INT, &min_icon_size,
/* TRANSLATORS: command line option */
_("Set the minimum icon size in pixels"), "ICON_SIZE" },
- { "api-version", '\0', 0, G_OPTION_ARG_DOUBLE, &api_version,
- /* TRANSLATORS: command line option */
- _("Set the AppStream version"), "API_VERSION" },
{ "old-metadata", '\0', 0, G_OPTION_ARG_FILENAME, &old_metadata,
/* TRANSLATORS: command line option */
_("Set the old metadata location"), "DIR" },
@@ -178,8 +174,6 @@ main (int argc, char **argv)
}
#endif
/* set defaults */
- if (api_version < 0.01)
- api_version = 0.8;
if (temp_dir == NULL)
temp_dir = g_strdup ("./tmp");
if (log_dir == NULL)
@@ -192,14 +186,6 @@ main (int argc, char **argv)
cache_dir = g_strdup ("./cache");
setlocale (LC_ALL, "");
- /* obsolete */
- if (api_version < 0.6) {
- /* TRANSLATORS: error message */
- g_warning ("%s", _("API version no longer supported"));
- retval = EXIT_FAILURE;
- goto out;
- }
-
/* this really ought to be set */
if (basename == NULL) {
g_print ("WARNING: Metadata basename not set, using 'appstream'\n");
@@ -211,7 +197,7 @@ main (int argc, char **argv)
}
ctx = asb_context_new ();
- asb_context_set_api_version (ctx, api_version);
+ asb_context_set_api_version (ctx, 0.8);
asb_context_set_old_metadata (ctx, old_metadata);
asb_context_set_log_dir (ctx, log_dir);
asb_context_set_temp_dir (ctx, temp_dir);
diff --git a/client/as-compose.c b/client/as-compose.c
index 3fbdfdf..e1e8865 100644
--- a/client/as-compose.c
+++ b/client/as-compose.c
@@ -326,7 +326,6 @@ main (int argc, char **argv)
g_autoptr(GFile) xml_dir = NULL;
g_autoptr(GFile) xml_file = NULL;
gint min_icon_size = 32;
- gdouble api_version = 0.0f;
guint i;
const GOptionEntry options[] = {
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
@@ -350,9 +349,6 @@ main (int argc, char **argv)
{ "basename", '\0', 0, G_OPTION_ARG_STRING, &basename,
/* TRANSLATORS: command line option */
_("Set the basenames of the output files"), "NAME" },
- { "api-version", '\0', 0, G_OPTION_ARG_DOUBLE, &api_version,
- /* TRANSLATORS: command line option */
- _("Set the AppStream version"), "API_VERSION" },
{ NULL}
};
@@ -374,8 +370,6 @@ main (int argc, char **argv)
g_setenv ("G_MESSAGES_DEBUG", "all", TRUE);
/* set defaults */
- if (api_version < 0.01)
- api_version = 0.8;
if (prefix == NULL)
prefix = g_strdup ("/usr");
if (output_dir == NULL)
@@ -397,7 +391,7 @@ main (int argc, char **argv)
}
store = as_store_new ();
- as_store_set_api_version (store, api_version);
+ as_store_set_api_version (store, 0.8);
as_store_set_origin (store, origin);
/* load each application specified */