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();
37 const char *basefile = 0;
39 while ((c = getopt (argc, argv, "xb:r:")) >= 0)
58 refpool = pool_create();
61 if ((fp = fopen(argv[optind], "r")) == NULL)
66 ref = repo_create(refpool, "ref");
67 repo_add_solv(ref, fp);
68 repo_disable_paging(ref);
72 repo = repo_create(pool, "installed");
73 repo_add_rpmdb(repo, ref, root);
76 if (ref->pool != pool)
83 tool_write(repo, basefile, 0);