summaryrefslogtreecommitdiff
path: root/tools/rpmdb2solv.c
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2008-03-03 17:11:40 +0000
committerMichael Schroeder <mls@suse.de>2008-03-03 17:11:40 +0000
commit0d8901de92af4d0337a2410badcae82aeeec4ae9 (patch)
tree4e5706ac471d9cfbe6e9c415d80b80b8129e74e7 /tools/rpmdb2solv.c
parent35bcf83488fc947ae04f10173133ce7ec71e04d1 (diff)
downloadlibsolv-0d8901de92af4d0337a2410badcae82aeeec4ae9.tar.gz
libsolv-0d8901de92af4d0337a2410badcae82aeeec4ae9.tar.bz2
libsolv-0d8901de92af4d0337a2410badcae82aeeec4ae9.zip
- add '-d' option to susetags2solv, reads all packages files
- add '-b' option to susetags2solv and rpmdb2solv - both options currently a bit experimental
Diffstat (limited to 'tools/rpmdb2solv.c')
-rw-r--r--tools/rpmdb2solv.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/tools/rpmdb2solv.c b/tools/rpmdb2solv.c
index e818e11..81d58bd 100644
--- a/tools/rpmdb2solv.c
+++ b/tools/rpmdb2solv.c
@@ -31,13 +31,19 @@ main(int argc, char **argv)
Repo *repo, *ref = 0;
FILE *fp;
Pool *refpool;
- int g;
+ int c;
const char *root = "/";
+ const char *basefile = 0;
- while ((g = getopt (argc, argv, "r:")) >= 0)
- switch (g)
+ while ((c = getopt (argc, argv, "b:r:")) >= 0)
+ switch (c)
{
- case 'r': root = optarg; break;
+ case 'r':
+ root = optarg;
+ break;
+ case 'b':
+ basefile = optarg;
+ break;
default:
exit(1);
}
@@ -66,7 +72,7 @@ main(int argc, char **argv)
ref = 0;
}
- tool_write(repo, 0, 0);
+ tool_write(repo, basefile, 0);
pool_free(pool);
exit(0);