diff options
author | Ingo Weinhold <ingo_weinhold@gmx.de> | 2013-03-30 13:22:24 +0000 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2013-04-16 11:09:45 +0200 |
commit | eb880a653d94ae7f2a98813c8f7861404fc05a51 (patch) | |
tree | b9b604310d362af1dec64a6b08a5f87e73ea532a /src/pool.c | |
parent | a9b6445cf5cc2d53b03cf4d618ded29ee56b6f5f (diff) | |
download | libsolv-eb880a653d94ae7f2a98813c8f7861404fc05a51.tar.gz libsolv-eb880a653d94ae7f2a98813c8f7861404fc05a51.tar.bz2 libsolv-eb880a653d94ae7f2a98813c8f7861404fc05a51.zip |
Add support for Haiku compat version comparison
Diffstat (limited to 'src/pool.c')
-rw-r--r-- | src/pool.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -611,6 +611,19 @@ pool_match_flags_evr(Pool *pool, int pflags, Id pevr, int flags, int evr) return 1; /* both rels show in the same direction */ if (pevr == evr) return (flags & pflags & REL_EQ) ? 1 : 0; + if (ISRELDEP(pevr)) + { + Reldep *range = GETRELDEP(pool, pevr); + if (range->flags != REL_COMPAT) + return 0; /* unsupported */ + /* range->name is the backwards compatibility version, range->evr the + actual version. If flags are '>=' or '>', we match the compatibility + version as well, otherwise only the actual version. */ + if (!(flags & REL_GT) || (flags & REL_LT)) + return pool_match_flags_evr(pool, REL_EQ, range->evr, flags, evr); + return pool_match_flags_evr(pool, REL_LT | REL_EQ, range->evr, flags, evr) && + pool_match_flags_evr(pool, REL_GT | REL_EQ, range->name, REL_EQ, evr); + } switch (pool_evrcmp(pool, pevr, evr, EVRCMP_DEPCMP)) { case -2: |