From: Michael Schroeder Date: Wed, 27 Mar 2019 12:16:53 +0000 (+0100) Subject: Support DISTTYPE_CONDA in dep2str() X-Git-Tag: 0.7.4~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7bc2134101a3e9383af39b0599d38285c7845130;p=thirdparty%2Flibsolv.git Support DISTTYPE_CONDA in dep2str() This basically strips the spaces from the relops and uses ',' for REL_WITH and '|' for REL_OR. --- diff --git a/src/poolid.c b/src/poolid.c index 3b55f764..1312ab9c 100644 --- a/src/poolid.c +++ b/src/poolid.c @@ -168,6 +168,20 @@ pool_id2rel(const Pool *pool, Id id) if (!ISRELDEP(id)) return ""; rd = GETRELDEP(pool, id); + +#ifdef ENABLE_CONDA + if (pool->disttype == DISTTYPE_CONDA) + { + static const char *condarels[] = { "!", ">", "=", ">=", "<", "!=", "<=", "<=>" }; + if (rd->flags < 8) + return condarels[rd->flags]; + if (rd->flags == REL_WITH) + return ","; + if (rd->flags == REL_OR) + return "|"; + } +#endif + switch (rd->flags) { /* debian special cases < and > */