2 * Copyright (c) 2013, Novell Inc.
4 * This program is licensed under the BSD license, read LICENSE.BSD
5 * for further information
11 * parse AppStream appdata type xml and write out .solv file
17 #include <sys/types.h>
27 #include "repo_appdata.h"
28 #include "common_write.h"
31 main(int argc, char **argv)
33 Pool *pool = pool_create();
36 const char *appdatadir = 0;
39 while ((c = getopt(argc, argv, "hd:r:")) >= 0)
50 fprintf(stderr, "usage: appdata2solv [-d appdatadir]");
51 exit(c == 'h' ? 0 : 1);
56 pool_set_rootdir(pool, root);
58 repo = repo_create(pool, "<stdin>");
61 if (repo_add_appdata(repo, stdin, 0))
63 fprintf(stderr, "appdata2solv: %s\n", pool_errstr(pool));
69 if (repo_add_appdata_dir(repo, appdatadir, REPO_USE_ROOTDIR))
71 fprintf(stderr, "appdata2solv: %s\n", pool_errstr(pool));
75 tool_write(repo, 0, 0);