diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-02-17 16:47:10 +0000 |
---|---|---|
committer | Florian Festi <ffesti@redhat.com> | 2015-03-18 13:31:29 +0100 |
commit | d9f673bf2841bb8c854e6676871078ab563a51c9 (patch) | |
tree | 16beb0f42e910a411ae7adbf5dd7a7aee8bdab0c /build/parsePrep.c | |
parent | f793add4ae429e11664b403df4c32a73bc31a6e8 (diff) | |
download | rpm-d9f673bf2841bb8c854e6676871078ab563a51c9.tar.gz |
Diagnose corrupt/empty compressed patches
Currently the failure status from the decompression processes
is ignored, resulting in silent failures to apply corrupt
compressed patches, which is easily missed.
Adjust so that patch(1) (and thus the full command line) will fail.
Diffstat (limited to 'build/parsePrep.c')
-rw-r--r-- | build/parsePrep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/build/parsePrep.c b/build/parsePrep.c index 12ef0c8d8..4a308a560 100644 --- a/build/parsePrep.c +++ b/build/parsePrep.c @@ -105,7 +105,8 @@ static char *doPatch(rpmSpec spec, uint32_t c, int strip, const char *db, /* Avoid the extra cost of fork and pipe for uncompressed patches */ if (compressed != COMPRESSED_NOT) { - patchcmd = rpmExpand("%{uncompress: ", fn, "} | %{__patch} ", args, NULL); + patchcmd = rpmExpand("%{uncompress: ", fn, "} || echo patch_fail | " + "%{__patch} ", args, NULL); } else { patchcmd = rpmExpand("%{__patch} ", args, " < ", fn, NULL); } |