From 7bc2134101a3e9383af39b0599d38285c7845130 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Wed, 27 Mar 2019 13:16:53 +0100 Subject: [PATCH] Support DISTTYPE_CONDA in dep2str() This basically strips the spaces from the relops and uses ',' for REL_WITH and '|' for REL_OR. --- src/poolid.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 > */ -- 2.47.2