2 * Copyright (c) 2007, Novell Inc.
4 * This program is licensed under the BSD license, read LICENSE.BSD
5 * for further information
13 #include <sys/types.h>
23 #include "repo_rpmdb.h"
24 #include "repo_solv.h"
25 #include "common_write.h"
28 main(int argc, char **argv)
30 Pool *pool = pool_create();
35 const char *root = "/";
36 const char *basefile = 0;
38 while ((c = getopt (argc, argv, "b:r:")) >= 0)
54 if ((fp = fopen(argv[optind], "r")) == NULL)
59 ref = repo_create(refpool, "ref");
60 repo_add_solv(ref, fp);
64 repo = repo_create(pool, "installed");
65 repo_add_rpmdb(repo, ref, root);
68 if (ref->pool != pool)
75 tool_write(repo, basefile, 0);