From 0254042972e8b301303ad00678e5388e7722b440 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Thu, 27 Oct 2016 14:53:44 +0900 Subject: Imported Upstream version 0.6.7 Change-Id: I4903b1e04cf23c0c38f633e48a06732764ee6444 Signed-off-by: DongHun Kwak --- ext/repo_autopattern.c | 2 ++ ext/repo_products.c | 5 +++++ 2 files changed, 7 insertions(+) (limited to 'ext') diff --git a/ext/repo_autopattern.c b/ext/repo_autopattern.c index 5132394..7edfc6c 100644 --- a/ext/repo_autopattern.c +++ b/ext/repo_autopattern.c @@ -377,6 +377,8 @@ repo_add_autopattern(Repo *repo, int flags) repodata_set_str(data, s2 - pool->solvables, PRODUCT_SHORTLABEL, newname); else if (!strcmp(pn, "product-register-target()") && evr) repodata_set_str(data, s2 - pool->solvables, PRODUCT_REGISTER_TARGET, newname); + else if (!strcmp(pn, "product-register-flavor()") && evr) + repodata_set_str(data, s2 - pool->solvables, PRODUCT_REGISTER_FLAVOR, newname); else if (!strcmp(pn, "product-type()") && evr) repodata_set_str(data, s2 - pool->solvables, PRODUCT_TYPE, newname); else if (!strcmp(pn, "product-cpeid()") && evr) diff --git a/ext/repo_products.c b/ext/repo_products.c index f7a36e1..cb69c49 100644 --- a/ext/repo_products.c +++ b/ext/repo_products.c @@ -60,6 +60,7 @@ enum state { STATE_REGISTER, STATE_TARGET, STATE_REGRELEASE, + STATE_REGFLAVOR, STATE_PRODUCTLINE, STATE_REGUPDATES, STATE_REGUPDREPO, @@ -97,6 +98,7 @@ static struct stateswitch stateswitches[] = { { STATE_LINGUAS, "lang", STATE_LANG, 0 }, { STATE_REGISTER, "target", STATE_TARGET, 1 }, { STATE_REGISTER, "release", STATE_REGRELEASE, 1 }, + { STATE_REGISTER, "flavor", STATE_REGFLAVOR, 1 }, { STATE_REGISTER, "updates", STATE_REGUPDATES, 0 }, { STATE_REGUPDATES, "repository", STATE_REGUPDREPO, 0 }, { NUMSTATES } @@ -366,6 +368,9 @@ endElement(void *userData, const char *name) case STATE_REGRELEASE: repodata_set_str(pd->data, pd->handle, PRODUCT_REGISTER_RELEASE, pd->content); break; + case STATE_REGFLAVOR: + repodata_set_str(pd->data, pd->handle, PRODUCT_REGISTER_FLAVOR, pd->content); + break; case STATE_CPEID: if (*pd->content) repodata_set_str(pd->data, pd->handle, SOLVABLE_CPEID, pd->content); -- cgit v1.2.3