dcavalca / rpms / rpm

Forked from rpms/rpm a year ago
Clone

Blame 0001-Mark-elements-with-associated-problems-as-failed.patch

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