teknoraver / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame rpm-4.4.2-transaction-order.patch

Paul Nasrat 786389
--- rpm-4.4.2/lib/depends.c.order	2006-11-20 11:17:13.000000000 +0000
Paul Nasrat 786389
+++ rpm-4.4.2/lib/depends.c	2006-11-20 11:19:19.000000000 +0000
Paul Nasrat ed558a
@@ -1421,7 +1421,14 @@
Paul Nasrat ed558a
 	(void) rpmteSetDegree(q, 0);
Paul Nasrat ed558a
 	tsbytes += rpmtePkgFileSize(q);
Paul Nasrat ed558a
 
Paul Nasrat ed558a
-	ordering[orderingCount] = rpmteAddedKey(q);
Paul Nasrat ed558a
+	switch (rpmteType(q)) {
Paul Nasrat ed558a
+	case TR_ADDED:
Paul Nasrat ed558a
+            ordering[orderingCount] = rpmteAddedKey(q);
Paul Nasrat ed558a
+            /*@switchbreak@*/ break;
Paul Nasrat ed558a
+	case TR_REMOVED:
Paul Nasrat ed558a
+            ordering[orderingCount] = RPMAL_NOMATCH;
Paul Nasrat ed558a
+            /*@switchbreak@*/ break;
Paul Nasrat ed558a
+        }
Paul Nasrat ed558a
 	orderingCount++;
Paul Nasrat ed558a
 	qlen--;
Paul Nasrat ed558a
 	loopcheck--;
Paul Nasrat 786389
@@ -1618,7 +1625,7 @@
Paul Nasrat 786389
 	    continue;
Paul Nasrat 786389
 
Paul Nasrat 786389
 	j = needle->orIndex;
Paul Nasrat 786389
-	if ((q = ts->order[j]) == NULL)
Paul Nasrat 786389
+	if ((q = ts->order[j]) == NULL || needle->pkgKey == RPMAL_NOMATCH)
Paul Nasrat 786389
 	    continue;
Paul Nasrat 786389
 
Paul Nasrat 786389
 	newOrder[newOrderCount++] = q;