2 * Copyright (c) 2012, Novell Inc.
4 * This program is licensed under the BSD license, read LICENSE.BSD
5 * for further information
11 * parse Mandriva/Mageie synthesis file
17 #include <sys/types.h>
28 #include "solv_xfopen.h"
29 #include "common_write.h"
35 fprintf(stderr, "\nUsage:\n"
36 "mdk2solv [-i <infoxml>]\n"
37 " reads a 'synthesis' repository from <stdin> and writes a .solv file to <stdout>\n"
38 " -i : info.xml file for extra attributes\n"
39 " -h : print help & exit\n"
45 main(int argc, char **argv)
52 while ((c = getopt(argc, argv, "i:")) >= 0)
68 repo = repo_create(pool, "<stdin>");
69 repo_add_mdk(repo, stdin, REPO_NO_INTERNALIZE);
72 FILE *fp = solv_xfopen(infofile, "r");
78 repo_add_mdk_info(repo, fp, REPO_EXTEND_SOLVABLES | REPO_REUSE_REPODATA | REPO_NO_INTERNALIZE);
81 repo_internalize(repo);
82 tool_write(repo, 0, 0);