diff options
author | Michael Schroeder <mls@suse.de> | 2012-02-22 13:24:36 +0100 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2012-02-22 13:24:36 +0100 |
commit | dc62cb2ebf49314da629de9fa4e0bb1fb47c3451 (patch) | |
tree | 8e84549c19584a12325f12af66792303a413a1bb /src/evr.c | |
parent | 9719138694aecbc578cc2bb3c8ea02ce1bc8fea5 (diff) | |
download | libsolv-dc62cb2ebf49314da629de9fa4e0bb1fb47c3451.tar.gz libsolv-dc62cb2ebf49314da629de9fa4e0bb1fb47c3451.tar.bz2 libsolv-dc62cb2ebf49314da629de9fa4e0bb1fb47c3451.zip |
- adapt to rpm changes regarding cornercases where the release is missing
Diffstat (limited to 'src/evr.c')
-rw-r--r-- | src/evr.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -225,9 +225,16 @@ pool_evrcmp_str(const Pool *pool, const char *evr1, const char *evr2, int mode) return 0; if (r1 && r2) { - if (s1 != ++r1 && s2 != ++r2) + if (mode != EVRCMP_MATCH || (s1 != ++r1 && s2 != ++r2)) r = solv_vercmp(r1, s1, r2, s2); } + else if (mode == EVRCMP_MATCH_RELEASE) + { + if (!r1 && r2) + return -2; + if (r1 && !r2) + return 2; + } return r; } |