Oops, fixup rpmsign exit codes on success
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 13 Oct 2010 11:20:30 +0000 (14:20 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 13 Oct 2010 11:20:30 +0000 (14:20 +0300)
rpmsign.c

index 543bd8f..a1d749e 100644 (file)
--- a/rpmsign.c
+++ b/rpmsign.c
@@ -109,6 +109,7 @@ static int doSign(poptContext optCon)
     if (checkPassPhrase(passPhrase) == 0) {
        const char *arg;
        fprintf(stderr, _("Pass phrase is good.\n"));
+       rc = 0;
        while ((arg = poptGetArg(optCon)) != NULL) {
            rc += rpmPkgSign(arg, NULL, passPhrase);
        }
@@ -142,6 +143,7 @@ int main(int argc, char *argv[])
        ec = doSign(optCon);
        break;
     case MODE_DELSIGN:
+       ec = 0;
        while ((arg = poptGetArg(optCon)) != NULL) {
            ec += rpmPkgDelSign(arg);
        }