summaryrefslogtreecommitdiff
path: root/rpm.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1999-03-22 17:31:53 +0000
committerjbj <devnull@localhost>1999-03-22 17:31:53 +0000
commitbd3990b81cbd1df9b5b5164ef32e44158288e95f (patch)
tree15494bdeb8a5bd8aeb2c14485297034e91591e8f /rpm.c
parent7944ca9ba3f29bc3a2f6ba69d2d0c55f080d6e6d (diff)
downloadrpm-bd3990b81cbd1df9b5b5164ef32e44158288e95f.tar.gz
rpm-bd3990b81cbd1df9b5b5164ef32e44158288e95f.tar.bz2
rpm-bd3990b81cbd1df9b5b5164ef32e44158288e95f.zip
fix: don't add header if signature generation failed (Carlo Wood).
CVS patchset: 2909 CVS date: 1999/03/22 17:31:53
Diffstat (limited to 'rpm.c')
-rwxr-xr-xrpm.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/rpm.c b/rpm.c
index a9dcbd727..8d08dd8e4 100755
--- a/rpm.c
+++ b/rpm.c
@@ -1100,7 +1100,7 @@ int main(int argc, char ** argv) {
if (errors) return errors;
if (poptPeekArg(optCon)) {
- switch (sigTag = rpmLookupSignatureType()) {
+ switch (sigTag = rpmLookupSignatureType(RPMLOOKUPSIG_QUERY)) {
case 0:
break;
case RPMSIGTAG_GPG:
@@ -1111,7 +1111,7 @@ int main(int argc, char ** argv) {
fprintf(stderr, _("pgp not found: "));
if (rpmDetectPGPVersion(RPMSIGTAG_PGP5)) {
fprintf(stderr,
- _("Use `signature: pgp5' instead of `signature: pgp' in spec file.\n"));
+ _("Use `%%_signature pgp5' instead of `%%_signature pgp' in macro file.\n"));
exit(EXIT_FAILURE);
}
/* Fall through to default: */
@@ -1121,7 +1121,7 @@ int main(int argc, char ** argv) {
fprintf(stderr, _("pgp version 5 not found: "));
if (rpmDetectPGPVersion(RPMSIGTAG_PGP)) {
fprintf(stderr,
- _("Use `signature: pgp' instead of `signature: pgp5' in spec file.\n"));
+ _("Use `%%_signature pgp' instead of `%%_signature pgp5' in macro file.\n"));
exit(EXIT_FAILURE);
}
/* Fall through to default: */
@@ -1137,16 +1137,19 @@ int main(int argc, char ** argv) {
}
/* Fall through */
default:
- fprintf(stderr, _("Invalid signature spec in rc file.\n"));
+ fprintf(stderr,
+ _("Invalid %%_signature spec in macro file.\n"));
exit(EXIT_FAILURE);
}
}
} else {
argerror(_("--sign may only be used during package building"));
}
- } else {
- /* Override any rpmrc setting */
- addMacro(&globalMacroContext, "_signature", NULL, "none", RMIL_CMDLINE);
+ }
+ else
+ {
+ /* Make rpmLookupSignatureType() return 0 ("none") from now on */
+ rpmLookupSignatureType(RPMLOOKUPSIG_DISABLE);
}
if (pipeOutput) {