diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-02-25 12:32:57 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-02-25 12:33:54 +0200 |
commit | 8e20523b9d7ad373ded0810cede0ce0e99a5cede (patch) | |
tree | 0921e82766374143d9da133602bc253c3c0d500b /lib/rpmte.c | |
parent | d496d9e60fde3a06528152f98719d32f68c7cf9c (diff) | |
download | librpm-tizen-8e20523b9d7ad373ded0810cede0ce0e99a5cede.tar.gz librpm-tizen-8e20523b9d7ad373ded0810cede0ce0e99a5cede.tar.bz2 librpm-tizen-8e20523b9d7ad373ded0810cede0ce0e99a5cede.zip |
Count the number of failures for transaction elements
- this lets us track whether the package itself failed or if it
was cancelled due to parent failure
Diffstat (limited to 'lib/rpmte.c')
-rw-r--r-- | lib/rpmte.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/rpmte.c b/lib/rpmte.c index a5708767f..f45781cff 100644 --- a/lib/rpmte.c +++ b/lib/rpmte.c @@ -688,18 +688,17 @@ FD_t rpmtePayload(rpmte te) int rpmteMarkFailed(rpmte te, rpmts ts) { rpmtsi pi = rpmtsiInit(ts); - int rc = 0; rpmte p; - te->failed = 1; + te->failed++; /* XXX we can do a much better here than this... */ while ((p = rpmtsiNext(pi, TR_REMOVED))) { if (rpmteDependsOn(p) == te) { - p->failed = 1; + p->failed++; } } rpmtsiFree(pi); - return rc; + return te->failed; } int rpmteFailed(rpmte te) |