From: Michael Matz Date: Fri, 15 Feb 2008 09:58:43 +0000 (+0000) Subject: susetags2solv always constructs attributes now, by default into the main X-Git-Tag: BASE-SuSE-Code-12_1-Branch~308^2~613 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5c7c9701d44ee82babd01680b41f25ddb22c2ca;p=thirdparty%2Flibsolv.git susetags2solv always constructs attributes now, by default into the main SOLV file. --- diff --git a/tools/repo2solv.sh b/tools/repo2solv.sh index c12f6049..1e7da830 100755 --- a/tools/repo2solv.sh +++ b/tools/repo2solv.sh @@ -89,6 +89,6 @@ elif test -d suse/setup/descr && test -s content; then esac done fi - ) | susetags2solv -a -c "${olddir}/content" + ) | susetags2solv -c "${olddir}/content" cd "$olddir" fi diff --git a/tools/repo_susetags.c b/tools/repo_susetags.c index 7f25973f..f1d81d71 100644 --- a/tools/repo_susetags.c +++ b/tools/repo_susetags.c @@ -369,7 +369,7 @@ tag_from_string (char *cs) */ void -repo_add_susetags(Repo *repo, FILE *fp, Id vendor, const char *attrname) +repo_add_susetags(Repo *repo, FILE *fp, Id vendor) { Pool *pool = repo->pool; char *line, *linep; @@ -383,11 +383,8 @@ repo_add_susetags(Repo *repo, FILE *fp, Id vendor, const char *attrname) struct parsedata pd; Repodata *data = 0; - if (attrname) - { - data = repo_add_repodata(repo); - init_attr_ids(pool); - } + data = repo_add_repodata(repo); + init_attr_ids(pool); memset(&pd, 0, sizeof(pd)); line = malloc(1024); @@ -615,11 +612,8 @@ repo_add_susetags(Repo *repo, FILE *fp, Id vendor, const char *attrname) last_found_pack = 0; indesc++; continue; - } - if (!attrname) - continue; - switch (tag) - { + + /* From here it's the attribute tags. */ case CTAG('=', 'G', 'r', 'p'): repodata_set_poolstr(data, last_found_pack, id_group, line + 6); continue; diff --git a/tools/repo_susetags.h b/tools/repo_susetags.h index 44dba8dc..432ca8f0 100644 --- a/tools/repo_susetags.h +++ b/tools/repo_susetags.h @@ -9,4 +9,4 @@ * if given, write attributes as '.attr' */ -extern void repo_add_susetags(Repo *repo, FILE *fp, Id vendor, const char *attrname); +extern void repo_add_susetags(Repo *repo, FILE *fp, Id vendor); diff --git a/tools/susetags2solv.c b/tools/susetags2solv.c index 5446a118..434687fe 100644 --- a/tools/susetags2solv.c +++ b/tools/susetags2solv.c @@ -50,10 +50,6 @@ main(int argc, char **argv) switch (*s++) { case 'h': usage(NULL); break; - case 'a': - if (attrname == NULL) - attrname = "test.attr"; - break; case 'n': if (argc) { @@ -106,7 +102,7 @@ main(int argc, char **argv) attrname = newname; } } - repo_add_susetags(repo, stdin, vendor, attrname); + repo_add_susetags(repo, stdin, vendor); tool_write(repo, 0, attrname); pool_free(pool); exit(0);