From 60cb663d7567796f17d4218757ea087ed690e4b2 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Mon, 9 Dec 2013 14:32:04 +0100 Subject: [PATCH] add appdata2solv.c --- tools/appdata2solv.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 tools/appdata2solv.c diff --git a/tools/appdata2solv.c b/tools/appdata2solv.c new file mode 100644 index 00000000..129fbc32 --- /dev/null +++ b/tools/appdata2solv.c @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2013, Novell Inc. + * + * This program is licensed under the BSD license, read LICENSE.BSD + * for further information + */ + +/* + * appdata2solv.c + * + * parse AppStream appdata type xml and write out .solv file + * + * reads from stdin + * writes to stdout + */ + +#include +#include +#include +#include +#include +#include + +#include "pool.h" +#include "repo.h" +#include "repo_appdata.h" +#include "common_write.h" + +int +main(int argc, char **argv) +{ + Pool *pool = pool_create(); + Repo *repo = repo_create(pool, ""); + if (repo_add_appdata(repo, stdin, 0)) + { + fprintf(stderr, "appdata2solv: %s\n", pool_errstr(pool)); + exit(1); + } + tool_write(repo, 0, 0); + pool_free(pool); + exit(0); +} -- 2.47.3