Blame rpm-4.8.0-verify-exitcode.patch
|
Panu Matilainen |
bbc081 |
commit 04ad4b1155ec4b082fbac425a575a0ba05337ab1
|
|
Panu Matilainen |
bbc081 |
Author: Panu Matilainen <pmatilai@redhat.com>
|
|
Panu Matilainen |
bbc081 |
Date: Thu Jan 21 14:14:28 2010 +0200
|
|
Panu Matilainen |
bbc081 |
|
|
Panu Matilainen |
bbc081 |
Really fix verification error code to not depend on verbosity (RhBug:557101)
|
|
Panu Matilainen |
bbc081 |
- earlier fix from commit 6649c23cac5823d0c7415df5cfd66e5aac5eebd2 was
|
|
Panu Matilainen |
bbc081 |
broken as it could reset return code to zero after detecting errors
|
|
Panu Matilainen |
bbc081 |
earlier
|
|
Panu Matilainen |
bbc081 |
|
|
Panu Matilainen |
bbc081 |
diff --git a/lib/verify.c b/lib/verify.c
|
|
Panu Matilainen |
bbc081 |
index 44ab314..1068cfe 100644
|
|
Panu Matilainen |
bbc081 |
--- a/lib/verify.c
|
|
Panu Matilainen |
bbc081 |
+++ b/lib/verify.c
|
|
Panu Matilainen |
bbc081 |
@@ -353,7 +353,7 @@ static int verifyHeader(QVA_t qva, const rpmts ts, Header h)
|
|
Panu Matilainen |
bbc081 |
static const char *const aok = ".";
|
|
Panu Matilainen |
bbc081 |
static const char *const unknown = "?";
|
|
Panu Matilainen |
bbc081 |
|
|
Panu Matilainen |
bbc081 |
- ec = (verifyResult != 0);
|
|
Panu Matilainen |
bbc081 |
+ if (verifyResult) ec = 1;
|
|
Panu Matilainen |
bbc081 |
|
|
Panu Matilainen |
bbc081 |
#define _verify(_RPMVERIFY_F, _C) \
|
|
Panu Matilainen |
bbc081 |
((verifyResult & _RPMVERIFY_F) ? _C : aok)
|