From: Michael Schroeder Date: Fri, 24 Jan 2014 12:49:29 +0000 (+0100) Subject: add forgotten -X option to susetags2solv tool X-Git-Tag: 0.6.4~114 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fdd979e90b0178cd508a841caf7378e1f3e0327;p=thirdparty%2Flibsolv.git add forgotten -X option to susetags2solv tool --- diff --git a/tools/susetags2solv.c b/tools/susetags2solv.c index 524253b5..71c65d80 100644 --- a/tools/susetags2solv.c +++ b/tools/susetags2solv.c @@ -22,6 +22,9 @@ #include "repo_solv.h" #include "repo_susetags.h" #include "repo_content.h" +#ifdef SUSE +#include "repo_autopattern.h" +#endif #include "common_write.h" #include "solv_xfopen.h" @@ -68,11 +71,14 @@ main(int argc, char **argv) const char *mergefile = 0; Id defvendor = 0; int flags = 0; +#ifdef SUSE + int add_auto = 0; +#endif int c; Pool *pool; Repo *repo; - while ((c = getopt(argc, argv, "hn:c:d:b:q:M:")) >= 0) + while ((c = getopt(argc, argv, "hn:c:d:b:q:M:X")) >= 0) { switch (c) { @@ -97,6 +103,11 @@ main(int argc, char **argv) case 'M': mergefile = optarg; break; + case 'X': +#ifdef SUSE + add_auto = 1; +#endif + break; default: usage(1); break; @@ -295,6 +306,10 @@ main(int argc, char **argv) } fclose(fp); } +#ifdef SUSE + if (add_auto) + repo_add_autopattern(repo, 0); +#endif if (query) doquery(pool, repo, query);