]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Use the correct solvable id when checking the noarch map
authorMichael Schroeder <mls@suse.de>
Tue, 12 Nov 2024 09:44:07 +0000 (10:44 +0100)
committerMichael Schroeder <mls@suse.de>
Tue, 12 Nov 2024 09:44:07 +0000 (10:44 +0100)
Fixes issue #574

src/solver.c

index edd7ff81420b48c22079a701b2f5ef3a501ac134..2d78f80a8a998f38935df0109b70d63d30be79c9 100644 (file)
@@ -1148,7 +1148,7 @@ replaces_installed_package(Pool *pool, Id p, Map *noupdate)
   FOR_PROVIDES(p2, pp2, s->name)
     {
       s2 = pool->solvables + p2;
-      if (s2->repo == installed && s2->name == s->name && !(noupdate && MAPTST(noupdate, p - installed->start)))
+      if (s2->repo == installed && s2->name == s->name && !(noupdate && MAPTST(noupdate, p2 - installed->start)))
        return 1;
     }
   if (!s->obsoletes)
@@ -1159,7 +1159,7 @@ replaces_installed_package(Pool *pool, Id p, Map *noupdate)
       FOR_PROVIDES(p2, pp2, obs)
        {
          s2 = pool->solvables + p2;
-         if (s2->repo != pool->installed || (noupdate && MAPTST(noupdate, p - installed->start)))
+         if (s2->repo != pool->installed || (noupdate && MAPTST(noupdate, p2 - installed->start)))
            continue;
          if (!pool->obsoleteusesprovides && !pool_match_nevr(pool, s2, obs))
            continue;