2 * Copyright (c) 2007, Novell Inc.
4 * This program is licensed under the BSD license, read LICENSE.BSD
5 * for further information
10 #include <sys/types.h>
18 #include "repo_rpmmd.h"
20 #include "repo_autopattern.h"
22 #include "common_write.h"
23 #include "solv_xfopen.h"
29 fprintf(stderr, "\nUsage:\n"
31 " reads 'primary' from a 'rpmmd' repository from <stdin> and writes a .solv file to <stdout>\n"
32 " -h : print help & exit\n"
38 main(int argc, char **argv)
45 Pool *pool = pool_create();
46 Repo *repo = repo_create(pool, "<stdin>");
48 while ((c = getopt (argc, argv, "hX")) >= 0)
65 if (repo_add_rpmmd(repo, stdin, 0, 0))
67 fprintf(stderr, "rpmmd2solv: %s\n", pool_errstr(pool));
72 repo_add_autopattern(repo, 0);
74 tool_write(repo, stdout);