From: Michael Schroeder Date: Tue, 16 Apr 2013 11:19:50 +0000 (+0200) Subject: switch range->name and range->evr in REL_COMPAT deps so that stringification works X-Git-Tag: BASE-SuSE-Code-12_3-Branch~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99c3407a3e342f91fc0aac63365f54c2e7f3263e;p=thirdparty%2Flibsolv.git switch range->name and range->evr in REL_COMPAT deps so that stringification works --- diff --git a/ext/repo_haiku.cpp b/ext/repo_haiku.cpp index e5b448f3..6aeec570 100644 --- a/ext/repo_haiku.cpp +++ b/ext/repo_haiku.cpp @@ -56,8 +56,8 @@ static void add_dependency(Repo *repo, Offset &dependencies, const char *name, if (compatVersion && compatVersion[0] != '\0') { - versionId = pool_rel2id(pool, pool_str2id(pool, compatVersion, 1), - versionId, REL_COMPAT, 1); + versionId = pool_rel2id(pool, versionID, pool_str2id(pool, compatVersion, 1), + REL_COMPAT, 1); } dependency = pool_rel2id(pool, dependency, versionId, flags, 1); diff --git a/src/pool.c b/src/pool.c index 9eddb2b1..ffe1fefc 100644 --- a/src/pool.c +++ b/src/pool.c @@ -652,13 +652,13 @@ pool_match_flags_evr(Pool *pool, int pflags, Id pevr, int flags, int evr) static int pool_match_flags_evr_rel_compat(Pool *pool, Reldep *range, int flags, int evr) { - /* 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. */ + /* range->name is the actual version, range->evr the backwards compatibility + 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); + return pool_match_flags_evr(pool, REL_EQ, range->name, flags, evr); + return pool_match_flags_evr(pool, REL_LT | REL_EQ, range->name, flags, evr) && + pool_match_flags_evr(pool, REL_GT | REL_EQ, range->evr, REL_EQ, evr); } #endif