2 * Copyright (c) 2012, Novell Inc.
4 * This program is licensed under the BSD license, read LICENSE.BSD
5 * for further information
11 * parse archlinux repo file
17 #include <sys/types.h>
27 #include "repo_arch.h"
28 #include "solv_xfopen.h"
29 #include "common_write.h"
35 fprintf(stderr, "\nUsage:\n"
37 " reads a repository from <stdin> and writes a .solv file to <stdout>\n"
38 " -l <dbdir> : read local database\n"
39 " -h : print help & exit\n"
45 main(int argc, char **argv)
50 const char *localdb = 0;
52 while ((c = getopt(argc, argv, "hl:")) >= 0)
68 repo = repo_create(pool, "<stdin>");
70 ret = repo_add_arch_local(repo, localdb, 0);
72 ret = repo_add_arch_repo(repo, stdin, 0);
75 fprintf(stderr, "archrepo2solv: %s\n", pool_errstr(pool));
78 tool_write(repo, 0, 0);