From: Michael Schroeder Date: Wed, 18 Feb 2015 15:20:48 +0000 (+0100) Subject: chain comparison ops with REL_COMPAT X-Git-Tag: 0.6.9~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91d734be1a3c94c6deb1434db395480fad8a4546;p=thirdparty%2Flibsolv.git chain comparison ops with REL_COMPAT --- diff --git a/ext/testcase.c b/ext/testcase.c index d21bdaf3..717574aa 100644 --- a/ext/testcase.c +++ b/ext/testcase.c @@ -443,6 +443,8 @@ testcase_dep2str_complex(Pool *pool, Id id, int addparens) needparens = 0; /* chain */ if (rd->flags == REL_OR && rd2->flags == REL_OR) needparens = 0; /* chain */ + if (rd->flags > 0 && rd->flags < 8 && rd2->flags == REL_COMPAT) + needparens = 0; /* chain */ } if (!ISRELDEP(rd->evr)) s2 = testcase_id2str(pool, rd->evr, 0); @@ -564,7 +566,7 @@ testcase_str2dep_complex(Pool *pool, const char **sp, int relop) { while (*s == ' ' || *s == '\t') s++; - if (!*s || *s == ')' || relop) + if (!*s || *s == ')' || (relop && strncmp(s, "compat >= ", 10) != 0)) { *sp = s; return id;