chantra / rpms / rpm

Forked from rpms/rpm 2 years ago
Clone
0b2921
From 57b4f21634429ccd29d47cf93ec0841f70b68404 Mon Sep 17 00:00:00 2001
0b2921
Message-Id: <57b4f21634429ccd29d47cf93ec0841f70b68404.1545311826.git.pmatilai@redhat.com>
0b2921
From: Panu Matilainen <pmatilai@redhat.com>
0b2921
Date: Tue, 18 Sep 2018 11:02:36 +0300
0b2921
Subject: [PATCH] Mark elements with associated problems as failed
0b2921
0b2921
An element with a problem can not possibly succeed so mark these failures
0b2921
early. Doesn't make much of a difference as problems will prevent the
0b2921
transaction from starting in the first place but it makes sense anyway.
0b2921
---
0b2921
 lib/rpmte.c | 1 +
0b2921
 1 file changed, 1 insertion(+)
0b2921
0b2921
diff --git a/lib/rpmte.c b/lib/rpmte.c
0b2921
index 4bdeeaf68..c5d614f67 100644
0b2921
--- a/lib/rpmte.c
0b2921
+++ b/lib/rpmte.c
0b2921
@@ -703,6 +703,7 @@ static void appendProblem(rpmte te, rpmProblemType type,
0b2921
 	if (te->probs == NULL)
0b2921
 	    te->probs = rpmpsCreate();
0b2921
 	rpmpsAppendProblem(te->probs, p);
0b2921
+	rpmteMarkFailed(te);
0b2921
     }
0b2921
     rpmProblemFree(p);
0b2921
 }
0b2921
-- 
0b2921
2.19.2
0b2921