]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
switch range->name and range->evr in REL_COMPAT deps so that stringification works
authorMichael Schroeder <mls@suse.de>
Tue, 16 Apr 2013 11:19:50 +0000 (13:19 +0200)
committerMichael Schroeder <mls@suse.de>
Tue, 16 Apr 2013 11:19:50 +0000 (13:19 +0200)
ext/repo_haiku.cpp
src/pool.c

index e5b448f3c6705f7cda6c0cb28485dae04565de78..6aeec570e2e8a7a447289909faf59ade885c1611 100644 (file)
@@ -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);
index 9eddb2b120bb5d070566a98d54e5e4ad5392b5ce..ffe1fefce29c1ea456b411909089f08d1df05457 100644 (file)
@@ -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