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>
25 #include "repo_appdata.h"
26 #include "common_write.h"
29 main(int argc, char **argv)
31 Pool *pool = pool_create();
34 const char *appdatadir = 0;
37 while ((c = getopt(argc, argv, "hd:r:")) >= 0)
48 fprintf(stderr, "usage: appdata2solv [-d appdatadir]");
49 exit(c == 'h' ? 0 : 1);
54 pool_set_rootdir(pool, root);
56 repo = repo_create(pool, "<stdin>");
59 if (repo_add_appdata(repo, stdin, 0))
61 fprintf(stderr, "appdata2solv: %s\n", pool_errstr(pool));
67 if (repo_add_appdata_dir(repo, appdatadir, REPO_USE_ROOTDIR))
69 fprintf(stderr, "appdata2solv: %s\n", pool_errstr(pool));
73 tool_write(repo, 0, 0);