summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2014-06-23 16:44:48 +0200
committerMichael Schroeder <mls@suse.de>2014-06-23 16:45:54 +0200
commita52836206e91b14de83ffa1f9cce7194066f314f (patch)
tree3fe66dd7a4828b494f1ee2c486fc586ab66a5df4 /tools
parent21bd8cb580e2a02ba60d9c7fea8b398b284c0b0d (diff)
downloadlibsolv-a52836206e91b14de83ffa1f9cce7194066f314f.tar.gz
libsolv-a52836206e91b14de83ffa1f9cce7194066f314f.tar.bz2
libsolv-a52836206e91b14de83ffa1f9cce7194066f314f.zip
support -X option in rpmmd2solv, make add_autopattern available in bindings
Diffstat (limited to 'tools')
-rw-r--r--tools/rpmmd2solv.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/tools/rpmmd2solv.c b/tools/rpmmd2solv.c
index ee39eac..d4fe2ff 100644
--- a/tools/rpmmd2solv.c
+++ b/tools/rpmmd2solv.c
@@ -19,6 +19,9 @@
#include "pool.h"
#include "repo.h"
#include "repo_rpmmd.h"
+#ifdef SUSE
+#include "repo_autopattern.h"
+#endif
#include "common_write.h"
#include "solv_xfopen.h"
@@ -44,11 +47,14 @@ main(int argc, char **argv)
const char *basefile = 0;
const char *dir = 0;
const char *locale = 0;
+#ifdef SUSE
+ int add_auto = 0;
+#endif
Pool *pool = pool_create();
Repo *repo = repo_create(pool, "<stdin>");
- while ((c = getopt (argc, argv, "hn:b:d:l:")) >= 0)
+ while ((c = getopt (argc, argv, "hn:b:d:l:X")) >= 0)
{
switch(c)
{
@@ -67,6 +73,11 @@ main(int argc, char **argv)
case 'l':
locale = optarg;
break;
+ case 'X':
+#ifdef SUSE
+ add_auto = 1;
+#endif
+ break;
default:
usage(1);
break;
@@ -142,6 +153,10 @@ main(int argc, char **argv)
exit(1);
}
}
+#ifdef SUSE
+ if (add_auto)
+ repo_add_autopattern(repo, 0);
+#endif
tool_write(repo, basefile, attrname);
pool_free(pool);
exit(0);