diff options
author | Michael Schroeder <mls@suse.de> | 2013-06-11 18:50:51 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2013-06-11 18:50:51 +0200 |
commit | 28f2be2009b9c58e9e39146b29e63ce8cc24933f (patch) | |
tree | 3a4cd8c1d863f105f526752f163f60c28383134e /ext/repo_arch.c | |
parent | dc40b0182fc9fee971d5b7ecb7f91200b3030bb7 (diff) | |
download | libsolv-28f2be2009b9c58e9e39146b29e63ce8cc24933f.tar.gz libsolv-28f2be2009b9c58e9e39146b29e63ce8cc24933f.tar.bz2 libsolv-28f2be2009b9c58e9e39146b29e63ce8cc24933f.zip |
make license/group a poolstr array for archlinux
The archlinux spec says that there can be multiple entries.
Also add a little hack to solvable_lookup_str so that it joins
the array elements for license/group lookups.
Diffstat (limited to 'ext/repo_arch.c')
-rw-r--r-- | ext/repo_arch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/repo_arch.c b/ext/repo_arch.c index d8dd8af..e09d838 100644 --- a/ext/repo_arch.c +++ b/ext/repo_arch.c @@ -411,11 +411,11 @@ repo_add_arch_pkg(Repo *repo, const char *fn, int flags) else if (!strncmp(line, "arch = ", 7)) s->arch = pool_str2id(pool, line + 7, 1); else if (!strncmp(line, "license = ", 10)) - repodata_set_poolstr(data, s - pool->solvables, SOLVABLE_LICENSE, line + 10); + repodata_add_poolstr_array(data, s - pool->solvables, SOLVABLE_LICENSE, line + 10); else if (!strncmp(line, "replaces = ", 11)) s->obsoletes = adddep(repo, s->obsoletes, line + 11); else if (!strncmp(line, "group = ", 8)) - repodata_set_poolstr(data, s - pool->solvables, SOLVABLE_GROUP, line + 8); + repodata_add_poolstr_array(data, s - pool->solvables, SOLVABLE_GROUP, line + 8); else if (!strncmp(line, "depend = ", 9)) s->requires = adddep(repo, s->requires, line + 9); else if (!strncmp(line, "optdepend = ", 12)) @@ -601,7 +601,7 @@ adddata(Repodata *data, Solvable *s, struct tarhead *th) else if (!strcmp(line, "%GROUPS%")) { if (getsentrynl(th, line, sizeof(line))) - repodata_set_poolstr(data, s - pool->solvables, SOLVABLE_GROUP, line); + repodata_add_poolstr_array(data, s - pool->solvables, SOLVABLE_GROUP, line); } else if (!strcmp(line, "%CSIZE%")) { @@ -634,7 +634,7 @@ adddata(Repodata *data, Solvable *s, struct tarhead *th) else if (!strcmp(line, "%LICENSE%")) { if (getsentrynl(th, line, sizeof(line))) - repodata_set_poolstr(data, s - pool->solvables, SOLVABLE_LICENSE, line); + repodata_add_poolstr_array(data, s - pool->solvables, SOLVABLE_LICENSE, line); } else if (!strcmp(line, "%ARCH%")) { |