diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2023-01-26 12:11:22 +0200 |
---|---|---|
committer | Florian Festi <ffesti@redhat.com> | 2023-01-26 12:18:41 +0100 |
commit | b3adc8ce62517cd764a589d2bdccbf97dadb915a (patch) | |
tree | ee5abb33b641bed42e696e8c05068b9e9242ca47 /build/parsePrep.c | |
parent | fd2f743b3ef543a5b6fe963b2ec8c3c43b8424b9 (diff) | |
download | rpm-b3adc8ce62517cd764a589d2bdccbf97dadb915a.tar.gz |
Turn `%patch` without arguments and options into an error
Instead of treating `%patch` with no options and errors the same as
`%patch 0`, just raise an error. There will be folks who have missed the
warning-only phase, but we don't want to wait another ten years to finally
rid ourselves of these legacy quirks.
Related: #2205
Diffstat (limited to 'build/parsePrep.c')
-rw-r--r-- | build/parsePrep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/build/parsePrep.c b/build/parsePrep.c index 11e26beed..cc97303d3 100644 --- a/build/parsePrep.c +++ b/build/parsePrep.c @@ -383,8 +383,8 @@ static rpmRC doPatchMacro(rpmSpec spec, const char *line) argvAppend(&patchnums, (ARGV_const_t) poptGetArgs(optCon)); if (argvCount(patchnums) == 0) { - rpmlog(RPMLOG_WARNING, _("Patch number not specified: %s\n"), line); - argvAdd(&patchnums, "0"); + rpmlog(RPMLOG_ERR, _("Patch number not specified: %s\n"), line); + goto exit; } /* Convert to number, generate patch command and append to %prep script */ |