]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Transaction ordering: Allow more uninst->uninst edges
authorMichael Schroeder <mls@suse.de>
Mon, 2 Jun 2025 09:30:59 +0000 (11:30 +0200)
committerMichael Schroeder <mls@suse.de>
Mon, 2 Jun 2025 09:33:29 +0000 (11:33 +0200)
Only skip uninst->uninst edges if both elements are build to
inst elements.

src/order.c

index 753ce2c06a8d244d2d9ff339d972d96bb313c316..de29ab4f6375492920693fac76445e184f2c2c5e 100644 (file)
@@ -407,10 +407,11 @@ addsolvableedges(struct orderdata *od, Solvable *s)
                  if (s->repo != installed)
                    continue;   /* no inst->uninst edges, please! */
 
-                 /* uninst -> uninst edge. Those make trouble. Only add if we must */
-                 if (trans->transaction_installed[p - installed->start] && !havescripts(pool, p, &ignoreinst))
+                 /* uninst -> uninst edge. Those can make trouble, as uninst elements are often bound to
+                  * inst elements which use the opposite order. */
+                 if (trans->transaction_installed[p2 - installed->start] && trans->transaction_installed[p - installed->start] && !havescripts(pool, p, &ignoreinst))
                    {
-                     /* p is obsoleted by another package and has no scripts */
+                     /* both p and p2 are bound to inst elements and p has no scripts */
                      /* we assume that the obsoleter is good enough to replace p */
                      continue;
                    }