parseRCPOT: reject Provides containing logical operator < or >
Disallow those types of Provides that specify version ranges because Provides are not compatible with version ranges.
This commit is contained in:
parent
37bfd938fd
commit
a765b58010
@ -177,6 +177,12 @@ int parseRCPOT(Spec spec, Package pkg, const char *field, int tag,
|
||||
spec->lineNum, (spec->fileStack ? spec->line : field));
|
||||
return RPMERR_BADSPEC;
|
||||
}
|
||||
if ((tag == RPMTAG_PROVIDEFLAGS) &&
|
||||
(flags & (RPMSENSE_LESS | RPMSENSE_GREATER))) {
|
||||
rpmError(RPMERR_BADSPEC, _("line %d: Invalid logical operator in %s\n"),
|
||||
spec->lineNum, (spec->fileStack ? spec->line : field));
|
||||
return RPMERR_BADSPEC;
|
||||
}
|
||||
version = xmalloc((ve-v) + 1);
|
||||
strncpy(version, v, (ve-v));
|
||||
version[ve-v] = '\0';
|
||||
|
Loading…
x
Reference in New Issue
Block a user