Paul Nasrat ed558a
--- rpm-4.4.2/lib/depends.c.order	2006-10-25 10:24:39.000000000 +0100
Paul Nasrat ed558a
+++ rpm-4.4.2/lib/depends.c	2006-10-25 10:28:07.000000000 +0100
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--;