From: Michael Schroeder Date: Wed, 17 Apr 2013 12:02:09 +0000 (+0200) Subject: adapt SET_EV/SET_EVR magic to haiku for completeness X-Git-Tag: BASE-SuSE-Code-12_3-Branch~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68a1076f81fee768d3a48767cff1d98180a029aa;p=thirdparty%2Flibsolv.git adapt SET_EV/SET_EVR magic to haiku for completeness --- diff --git a/src/rules.c b/src/rules.c index cb1b421a..9307394d 100644 --- a/src/rules.c +++ b/src/rules.c @@ -1608,11 +1608,10 @@ jobtodisablelist(Solver *solv, Id how, Id what, Queue *q) { if (pool->disttype != DISTTYPE_DEB) { - const char *evr = pool_id2str(pool, rd->evr); - if (strchr(evr, '-')) - set |= SOLVER_SETEVR; - else - set |= SOLVER_SETEV; + const char *rel = strchr(pool_id2str(pool, rd->evr), '-'); + if (rel && pool->disttype == DISTTYPE_HAIKU && (rel[1] < '0' || rel[1] > '9')) + rel = 0; + set |= rel ? SOLVER_SETEVR : SOLVER_SETEV; } else set |= SOLVER_SETEVR; diff --git a/src/selection.c b/src/selection.c index 9ba63364..8fc1998c 100644 --- a/src/selection.c +++ b/src/selection.c @@ -217,7 +217,12 @@ selection_filter_rel(Pool *pool, Queue *selection, Id relflags, Id relevr) if (pool->disttype == DISTTYPE_DEB) selection->elements[i] |= SOLVER_SETEVR; /* debian can't match version only like rpm */ else - selection->elements[i] |= strchr(pool_id2str(pool, relevr), '-') != 0 ? SOLVER_SETEVR : SOLVER_SETEV; + { + const char *rel = strchr(pool_id2str(pool, relevr), '-'); + if (rel && pool->disttype == DISTTYPE_HAIKU && (rel[1] < '0' || rel[1] > '9')) + rel = 0; + selection->elements[i] |= rel ? SOLVER_SETEVR : SOLVER_SETEV; + } } } selection_prune(pool, selection);