From 4283a877a111db6bd3123e95c96a7f93b3643641 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Wed, 19 Mar 2008 19:06:29 +0000 Subject: [PATCH] Store pattern order, includes, extends, category and icon as attributes. Change keywords to use an IDARRAY (not only one ID). --- tools/repo_susetags.c | 23 ++++++++++++++++++++++- tools/susetags2solv.c | 2 +- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/tools/repo_susetags.c b/tools/repo_susetags.c index 0f785c4..4a417d7 100644 --- a/tools/repo_susetags.c +++ b/tools/repo_susetags.c @@ -757,7 +757,7 @@ repo_add_susetags(Repo *repo, FILE *fp, Id vendor, const char *language, int fla } continue; case CTAG('=', 'K', 'w', 'd'): - repodata_set_poolstr(data, last_found_pack, SOLVABLE_KEYWORDS, line + 6); + repodata_add_poolstr_array(data, last_found_pack, SOLVABLE_KEYWORDS, line + 6); continue; case CTAG('=', 'A', 'u', 't'): repodata_set_str(data, last_found_pack, SOLVABLE_AUTHORS, line + 6); @@ -803,6 +803,27 @@ repo_add_susetags(Repo *repo, FILE *fp, Id vendor, const char *language, int fla case CTAG('=', 'D', 'i', 'r'): add_dirline (&pd, line + 6); continue; + case CTAG('=', 'C', 'a', 't'): + repodata_set_poolstr(data, last_found_pack, SOLVABLE_CATEGORY, line + 6); + break; + case CTAG('=', 'O', 'r', 'd'): + /* Order is a string not a number, so we can retroactively insert + new patterns in the middle, i.e. 1 < 15 < 2. */ + repodata_set_str(data, last_found_pack, SOLVABLE_ORDER, line + 6); + break; + case CTAG('=', 'I', 'c', 'o'): + repodata_set_str(data, last_found_pack, SOLVABLE_ICON, line + 6); + break; + case CTAG('=', 'E', 'x', 't'): + repodata_add_poolstr_array(data, last_found_pack, SOLVABLE_EXTENDS, line + 6); + break; + case CTAG('=', 'I', 'n', 'c'): + repodata_add_poolstr_array(data, last_found_pack, SOLVABLE_INCLUDES, line + 6); + break; + + case CTAG('=', 'P', 'a', 't'): + case CTAG('=', 'P', 'k', 'g'): + break; default: break; diff --git a/tools/susetags2solv.c b/tools/susetags2solv.c index ae2c1e1..e383276 100644 --- a/tools/susetags2solv.c +++ b/tools/susetags2solv.c @@ -33,7 +33,7 @@ usage(int status) " -d : do not read from stdin, but use data in descrdir\n" " -h : print help & exit\n" " -k : don't mix kinds (experimental!)\n" - " -b : save fas multiple files starting with \n" + " -b : save as multiple files starting with \n" " -n : save attributes as .attr\n" ); exit(status); -- 2.7.4