build/parsePrep.c: add %patch -F<N> support (ALT#27662)
In modern rpms both %patch -F <N> and %patch -F<N> are valid option calls whereas old -F implementation supported -F <N> syntax only. This patch adds support for %patch -F<N> syntax.
This commit is contained in:
parent
f83f47f6f1
commit
8468c6fb06
@ -533,13 +533,18 @@ static int doPatchMacro(Spec spec, char *line)
|
||||
spec->lineNum, spec->line);
|
||||
return RPMERR_BADSPEC;
|
||||
}
|
||||
} else if (!strcmp(s, "-F")) {
|
||||
s = strtok(NULL, " \t\n");
|
||||
if (s == NULL) {
|
||||
rpmError(RPMERR_BADSPEC,
|
||||
_("line %d: Need arg to %%patch -F: %s\n"),
|
||||
spec->lineNum, spec->line);
|
||||
return RPMERR_BADSPEC;
|
||||
} else if (!strncmp(s, "-F", sizeof("-F")-1)) {
|
||||
/* unfortunately, we must support -FX */
|
||||
if (! strchr(" \t\n", s[2])) {
|
||||
s = s + 2;
|
||||
} else {
|
||||
s = strtok(NULL, " \t\n");
|
||||
if (s == NULL) {
|
||||
rpmError(RPMERR_BADSPEC,
|
||||
_("line %d: Need arg to %%patch -F: %s\n"),
|
||||
spec->lineNum, spec->line);
|
||||
return RPMERR_BADSPEC;
|
||||
}
|
||||
}
|
||||
if (parseNum(s, &opt_F)) {
|
||||
rpmError(RPMERR_BADSPEC,
|
||||
|
Loading…
x
Reference in New Issue
Block a user