Commit 64b03ab6 authored by Timo Teräs's avatar Timo Teräs

solver: fix change ordering of removed pages in relation to installed

parent 12183024
...@@ -913,19 +913,20 @@ static int compare_change(const void *p1, const void *p2) ...@@ -913,19 +913,20 @@ static int compare_change(const void *p1, const void *p2)
const struct apk_change *c2 = (const struct apk_change *) p2; const struct apk_change *c2 = (const struct apk_change *) p2;
if (c1->newpkg == NULL) { if (c1->newpkg == NULL) {
if (c2->newpkg == NULL) if (c2->newpkg == NULL) {
/* both deleted - reverse topology order */ /* both deleted - reverse topology order */
return c2->oldpkg->topology_hard - return c2->oldpkg->topology_hard -
c1->oldpkg->topology_hard; c1->oldpkg->topology_hard;
}
/* c1 deleted, c2 installed -> c2 first*/ /* c1 deleted, c2 installed -> c2 first*/
return -1; return 1;
} }
if (c2->newpkg == NULL) if (c2->newpkg == NULL)
/* c1 installed, c2 deleted -> c1 first*/ /* c1 installed, c2 deleted -> c1 first*/
return 1; return -1;
return c1->newpkg->topology_hard - return c1->newpkg->topology_hard -
c2->newpkg->topology_hard; c2->newpkg->topology_hard;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment