From: Pavla Kratochvilova Date: Thu, 12 Nov 2020 07:46:18 +0000 (+0100) Subject: Add support for default and langonly in comps xml X-Git-Tag: 0.7.17~2^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=148169b2babb95f59f44089188d1a1a62961f2f4;p=thirdparty%2Flibsolv.git Add support for default and langonly in comps xml --- diff --git a/ext/repo_comps.c b/ext/repo_comps.c index 69916567..5943fd67 100644 --- a/ext/repo_comps.c +++ b/ext/repo_comps.c @@ -29,7 +29,6 @@ * TODO: * * what's the difference between group/category? - * handle "default" and "langonly". * * maybe handle REL_COND in solver recommends handling? */ @@ -197,6 +196,18 @@ endElement(struct solv_xmlparser *xmlp, int state, char *content) repodata_set_void(pd->data, pd->handle, SOLVABLE_ISVISIBLE); break; + case STATE_DEFAULT: + repodata_set_void(pd->data, pd->handle, SOLVABLE_ISDEFAULT); + break; + + case STATE_LANG_ONLY: + repodata_set_str(pd->data, pd->handle, SOLVABLE_LANGONLY, content); + break; + + case STATE_LANGONLY: + repodata_set_str(pd->data, pd->handle, SOLVABLE_LANGONLY, content); + break; + case STATE_DISPLAY_ORDER: repodata_set_str(pd->data, pd->handle, SOLVABLE_ORDER, content); break; diff --git a/src/knownid.h b/src/knownid.h index b013d656..d131e784 100644 --- a/src/knownid.h +++ b/src/knownid.h @@ -267,6 +267,8 @@ KNOWNID(LIBSOLV_SELF_DESTRUCT_PKG, "libsolv-self-destruct-pkg()"), /* this KNOWNID(SOLVABLE_CONSTRAINS, "solvable:constrains"), /* conda */ KNOWNID(SOLVABLE_TRACK_FEATURES, "solvable:track_features"), /* conda */ +KNOWNID(SOLVABLE_ISDEFAULT, "solvable:isdefault"), +KNOWNID(SOLVABLE_LANGONLY, "solvable:langonly"), KNOWNID(UPDATE_COLLECTIONLIST, "update:collectionlist"), /* list of UPDATE_COLLECTION (actually packages) and UPDATE_MODULE */