summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2014-01-20 13:46:54 +0100
committerMichael Schroeder <mls@suse.de>2014-01-20 13:46:54 +0100
commit5fd9bd106a9a673bf35f6acc25874c5481cb8493 (patch)
tree4aaae91d042f9d7bac2cd448247aa10001cdfa7a
parentc33d89b262c86babbec4b8e42b936d1a61dac03e (diff)
downloadlibsolv-5fd9bd106a9a673bf35f6acc25874c5481cb8493.tar.gz
libsolv-5fd9bd106a9a673bf35f6acc25874c5481cb8493.tar.bz2
libsolv-5fd9bd106a9a673bf35f6acc25874c5481cb8493.zip
support DISTRO in content parser
-rw-r--r--ext/repo_content.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/repo_content.c b/ext/repo_content.c
index 5b61a6b..021c3b2 100644
--- a/ext/repo_content.c
+++ b/ext/repo_content.c
@@ -290,6 +290,24 @@ repo_add_content(Repo *repo, FILE *fp, int flags)
repodata_add_poolstr_array(data, SOLVID_META, REPOSITORY_REPOID, value);
continue;
}
+ if (istag ("DISTRO"))
+ {
+ Id dh = repodata_new_handle(data);
+ char *p;
+ /* like with createrepo --distro */
+ if ((p = strchr(value, ',')) != 0)
+ {
+ *p++ = 0;
+ if (*value)
+ repodata_set_poolstr(data, dh, REPOSITORY_PRODUCT_CPEID, value);
+ }
+ else
+ p = value;
+ if (*p)
+ repodata_set_str(data, dh, REPOSITORY_PRODUCT_LABEL, p);
+ repodata_add_flexarray(data, SOLVID_META, REPOSITORY_DISTROS, dh);
+ continue;
+ }
if (istag ("DESCRDIR"))
{