]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Make repo_mark_retracted_packages only look at the provided repo
authorMichael Schroeder <mls@suse.de>
Mon, 20 Apr 2020 15:30:20 +0000 (17:30 +0200)
committerMichael Schroeder <mls@suse.de>
Thu, 20 May 2021 09:59:20 +0000 (11:59 +0200)
Before this commit it worked like pool_mark_retracted_packages,
which is also something that we might need in the future.

For now, limit the search to the specified repo. This change
does nothing for the only use case that we currently have,
namely the repo2solv tool.

ext/repo_updateinfoxml.c

index ff08214d3a31c2df1e4656aeebbfa9628fb0d0f3..a944e161b27c15d6745e517569a23f1239ab7c9f 100644 (file)
@@ -489,7 +489,7 @@ repo_mark_retracted_packages(Repo *repo, Id retractedmarker)
 
   Queue q;
   queue_init(&q);
-  for (p = 1; p < pool->nsolvables; p++)
+  FOR_REPO_SOLVABLES(repo, p, s)
     {
       const char *status;
       s = pool->solvables + p;
@@ -543,7 +543,7 @@ repo_mark_retracted_packages(Repo *repo, Id retractedmarker)
       else if (q.elements[i + 1] == retractedname && q.elements[i + 2] == retractedevr)
        {
          s = pool->solvables + q.elements[i];
-         s->provides = repo_addid_dep(repo, s->provides, retractedmarker, 0);
+         s->provides = repo_addid_dep(s->repo, s->provides, retractedmarker, 0);
        }
     }
   queue_free(&q);