Skip to content

Commit

Permalink
Turn %patch without arguments and options into an error
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pmatilai authored and ffesti committed Jan 26, 2023
1 parent fd2f743 commit b3adc8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/parsePrep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit b3adc8c

Please sign in to comment.