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>
25 #include "repo_arch.h"
26 #include "solv_xfopen.h"
27 #include "common_write.h"
33 fprintf(stderr, "\nUsage:\n"
35 " reads a repository from <stdin> and writes a .solv file to <stdout>\n"
36 " -l <dbdir> : read local database\n"
37 " -h : print help & exit\n"
43 main(int argc, char **argv)
48 const char *localdb = 0;
50 while ((c = getopt(argc, argv, "hl:")) >= 0)
66 repo = repo_create(pool, "<stdin>");
68 ret = repo_add_arch_local(repo, localdb, 0);
70 ret = repo_add_arch_repo(repo, stdin, 0);
73 fprintf(stderr, "archrepo2solv: %s\n", pool_errstr(pool));
76 tool_write(repo, 0, 0);