diff options
-rw-r--r-- | ext/repo_autopattern.c | 2 | ||||
-rw-r--r-- | ext/repo_products.c | 10 | ||||
-rw-r--r-- | src/knownid.h | 2 |
3 files changed, 14 insertions, 0 deletions
diff --git a/ext/repo_autopattern.c b/ext/repo_autopattern.c index 0272f02..88db359 100644 --- a/ext/repo_autopattern.c +++ b/ext/repo_autopattern.c @@ -335,6 +335,8 @@ repo_add_autopattern(Repo *repo, int flags) repodata_set_str(data, s2 - pool->solvables, SOLVABLE_CPEID, newname); else if (!strcmp(pn, "product-flags()") && evr) repodata_add_poolstr_array(data, s2 - pool->solvables, PRODUCT_FLAGS, newname); + else if (!strcmp(pn, "product-updates-repoid()") && evr) + repodata_add_poolstr_array(data, s2 - pool->solvables, PRODUCT_UPDATES_REPOID, newname); else if (!strncmp(pn, "product-url(", 12) && evr && pn[12] && pn[13] && strlen(pn + 12) < 32) { char type[34]; diff --git a/ext/repo_products.c b/ext/repo_products.c index 4609ceb..7a164d8 100644 --- a/ext/repo_products.c +++ b/ext/repo_products.c @@ -58,6 +58,8 @@ enum state { STATE_TARGET, STATE_REGRELEASE, STATE_PRODUCTLINE, + STATE_REGUPDATES, + STATE_REGUPDREPO, NUMSTATES }; @@ -90,6 +92,8 @@ static struct stateswitch stateswitches[] = { { STATE_LINGUAS, "lang", STATE_LANG, 0 }, { STATE_REGISTER, "target", STATE_TARGET, 1 }, { STATE_REGISTER, "release", STATE_REGRELEASE, 1 }, + { STATE_REGISTER, "updates", STATE_REGUPDATES, 0 }, + { STATE_REGUPDATES, "repository", STATE_REGUPDREPO, 0 }, { NUMSTATES } }; @@ -218,6 +222,12 @@ startElement(void *userData, const char *name, const char **atts) case STATE_URL: pd->urltype = pool_str2id(pd->pool, find_attr("name", atts), 1); break; + case STATE_REGUPDREPO: + { + const char *repoid = find_attr("repoid", atts); + if (repoid && *repoid) + repodata_add_poolstr_array(pd->data, pd->handle, PRODUCT_UPDATES_REPOID, repoid); + } default: break; } diff --git a/src/knownid.h b/src/knownid.h index c18171a..42818dc 100644 --- a/src/knownid.h +++ b/src/knownid.h @@ -263,6 +263,8 @@ KNOWNID(PUBKEY_SUBKEYOF, "pubkey:subkeyof"), KNOWNID(DELTA_LOCATION_BASE, "delta:locbase"), /* <location xml:base=... > */ +KNOWNID(PRODUCT_UPDATES_REPOID, "product:updates:repoid"), + KNOWNID(ID_NUM_INTERNAL, 0) #ifdef KNOWNID_INITIALIZE |