diff options
author | Ingo Weinhold <ingo_weinhold@gmx.de> | 2013-04-18 16:11:01 +0200 |
---|---|---|
committer | Ingo Weinhold <ingo_weinhold@gmx.de> | 2013-04-18 18:10:44 +0200 |
commit | 6881184db997deb4d5bc0ff9f5c1402bf359391e (patch) | |
tree | 1018042990a63de73cd5bdb9ddf40152fa0dbcad /src/evr.c | |
parent | ce79dec8a03a122dd17eefdb3cdc66068c4d0de7 (diff) | |
download | libsolv-6881184db997deb4d5bc0ff9f5c1402bf359391e.tar.gz libsolv-6881184db997deb4d5bc0ff9f5c1402bf359391e.tar.bz2 libsolv-6881184db997deb4d5bc0ff9f5c1402bf359391e.zip |
Haiku: The notation for the pre-release version part changed
Instead of using '-' as the separator for the pre-release '~' is used
now. This allows to drop code in a few places where Haiku had to be
special-cased before.
Diffstat (limited to 'src/evr.c')
-rw-r--r-- | src/evr.c | 18 |
1 files changed, 2 insertions, 16 deletions
@@ -268,9 +268,9 @@ solv_vercmp_haiku(const char *s1, const char *q1, const char *s2, const char *q2 int cmp; /* find pre-release separator */ - while (pre1 != q1 && *pre1 != '-') + while (pre1 != q1 && *pre1 != '~') pre1++; - while (pre2 != q2 && *pre2 != '-') + while (pre2 != q2 && *pre2 != '~') pre2++; /* compare main versions */ @@ -390,14 +390,6 @@ pool_evrcmp_str(const Pool *pool, const char *evr1, const char *evr2, int mode) for (s2 = evr2, r2 = 0; *s2; s2++) if (*s2 == '-') r2 = s2; - if (pool->disttype == DISTTYPE_HAIKU) - { - /* make sure it's really a release, releases always are numeric */ - if (r1 && (r1[1] < '0' || r1[1] > '9')) - r1 = 0; - if (r2 && (r2[1] < '0' || r2[1] > '9')) - r2 = 0; - } r = 0; if (mode != EVRCMP_MATCH || (evr1 != (r1 ? r1 : s1) && evr2 != (r2 ? r2 : s2))) r = solv_vercmp(evr1, r1 ? r1 : s1, evr2, r2 ? r2 : s2); @@ -497,12 +489,6 @@ pool_evrmatch(const Pool *pool, Id evrid, const char *epoch, const char *version for (s1 = evr1, r1 = 0; *s1; s1++) if (*s1 == '-') r1 = s1; - if (pool->disttype == DISTTYPE_HAIKU) - { - /* make sure it's really a release, releases always are numeric */ - if (r1 && (r1[1] < '0' || r1[1] > '9')) - r1 = 0; - } if (version) { r = solv_vercmp(evr1, r1 ? r1 : s1, version, version + strlen(version)); |