Only create macros for the spec tags where it makes actual sense

There are numerous tags that have deeper internal logic, can appear
multiple times and where the line of last occurrence doesn't mean
anything at all, and is just confusing. Witness RhBug:555926 and
ticket #689.

Drop the macro creation for all dependency tags, build architecture-
related bits and things where it just doesn't make any sense, like
NoPatch/NoSource and AutoReq/Prov.

In theory this could break somebody's spec somewhere out there but
those usages would be better served by using custom macros instead.

Closes: #689
This commit is contained in:
Panu Matilainen 2019-05-06 16:08:30 +03:00 committed by Florian Festi
parent 6dafb24684
commit 7ca03925d8
1 changed files with 25 additions and 25 deletions

View File

@ -1019,37 +1019,37 @@ static struct PreambleRec_s const preambleList[] = {
{RPMTAG_VCS, 0, 0, 1, LEN_AND_STR("vcs")},
{RPMTAG_SOURCE, 0, 0, 0, LEN_AND_STR("source")},
{RPMTAG_PATCH, 0, 0, 0, LEN_AND_STR("patch")},
{RPMTAG_NOSOURCE, 0, 0, 1, LEN_AND_STR("nosource")},
{RPMTAG_NOPATCH, 0, 0, 1, LEN_AND_STR("nopatch")},
{RPMTAG_EXCLUDEARCH, 0, 0, 1, LEN_AND_STR("excludearch")},
{RPMTAG_EXCLUSIVEARCH, 0, 0, 1, LEN_AND_STR("exclusivearch")},
{RPMTAG_EXCLUDEOS, 0, 0, 1, LEN_AND_STR("excludeos")},
{RPMTAG_EXCLUSIVEOS, 0, 0, 1, LEN_AND_STR("exclusiveos")},
{RPMTAG_ICON, 0, 0, 1, LEN_AND_STR("icon")},
{RPMTAG_PROVIDENAME, 0, 0, 1, LEN_AND_STR("provides")},
{RPMTAG_REQUIRENAME, 2, 0, 1, LEN_AND_STR("requires")},
{RPMTAG_RECOMMENDNAME, 0, 0, 1, LEN_AND_STR("recommends")},
{RPMTAG_SUGGESTNAME, 0, 0, 1, LEN_AND_STR("suggests")},
{RPMTAG_SUPPLEMENTNAME, 0, 0, 1, LEN_AND_STR("supplements")},
{RPMTAG_ENHANCENAME, 0, 0, 1, LEN_AND_STR("enhances")},
{RPMTAG_PREREQ, 2, 1, 1, LEN_AND_STR("prereq")},
{RPMTAG_CONFLICTNAME, 0, 0, 1, LEN_AND_STR("conflicts")},
{RPMTAG_OBSOLETENAME, 0, 0, 1, LEN_AND_STR("obsoletes")},
{RPMTAG_NOSOURCE, 0, 0, 0, LEN_AND_STR("nosource")},
{RPMTAG_NOPATCH, 0, 0, 0, LEN_AND_STR("nopatch")},
{RPMTAG_EXCLUDEARCH, 0, 0, 0, LEN_AND_STR("excludearch")},
{RPMTAG_EXCLUSIVEARCH, 0, 0, 0, LEN_AND_STR("exclusivearch")},
{RPMTAG_EXCLUDEOS, 0, 0, 0, LEN_AND_STR("excludeos")},
{RPMTAG_EXCLUSIVEOS, 0, 0, 0, LEN_AND_STR("exclusiveos")},
{RPMTAG_ICON, 0, 0, 0, LEN_AND_STR("icon")},
{RPMTAG_PROVIDENAME, 0, 0, 0, LEN_AND_STR("provides")},
{RPMTAG_REQUIRENAME, 2, 0, 0, LEN_AND_STR("requires")},
{RPMTAG_RECOMMENDNAME, 0, 0, 0, LEN_AND_STR("recommends")},
{RPMTAG_SUGGESTNAME, 0, 0, 0, LEN_AND_STR("suggests")},
{RPMTAG_SUPPLEMENTNAME, 0, 0, 0, LEN_AND_STR("supplements")},
{RPMTAG_ENHANCENAME, 0, 0, 0, LEN_AND_STR("enhances")},
{RPMTAG_PREREQ, 2, 1, 0, LEN_AND_STR("prereq")},
{RPMTAG_CONFLICTNAME, 0, 0, 0, LEN_AND_STR("conflicts")},
{RPMTAG_OBSOLETENAME, 0, 0, 0, LEN_AND_STR("obsoletes")},
{RPMTAG_PREFIXES, 0, 0, 1, LEN_AND_STR("prefixes")},
{RPMTAG_PREFIXES, 0, 0, 1, LEN_AND_STR("prefix")},
{RPMTAG_BUILDROOT, 0, 0, 0, LEN_AND_STR("buildroot")},
{RPMTAG_BUILDARCHS, 0, 0, 1, LEN_AND_STR("buildarchitectures")},
{RPMTAG_BUILDARCHS, 0, 0, 1, LEN_AND_STR("buildarch")},
{RPMTAG_BUILDCONFLICTS, 0, 0, 1, LEN_AND_STR("buildconflicts")},
{RPMTAG_BUILDPREREQ, 0, 1, 1, LEN_AND_STR("buildprereq")},
{RPMTAG_BUILDREQUIRES, 0, 0, 1, LEN_AND_STR("buildrequires")},
{RPMTAG_AUTOREQPROV, 0, 0, 1, LEN_AND_STR("autoreqprov")},
{RPMTAG_AUTOREQ, 0, 0, 1, LEN_AND_STR("autoreq")},
{RPMTAG_AUTOPROV, 0, 0, 1, LEN_AND_STR("autoprov")},
{RPMTAG_BUILDARCHS, 0, 0, 0, LEN_AND_STR("buildarchitectures")},
{RPMTAG_BUILDARCHS, 0, 0, 0, LEN_AND_STR("buildarch")},
{RPMTAG_BUILDCONFLICTS, 0, 0, 0, LEN_AND_STR("buildconflicts")},
{RPMTAG_BUILDPREREQ, 0, 1, 0, LEN_AND_STR("buildprereq")},
{RPMTAG_BUILDREQUIRES, 0, 0, 0, LEN_AND_STR("buildrequires")},
{RPMTAG_AUTOREQPROV, 0, 0, 0, LEN_AND_STR("autoreqprov")},
{RPMTAG_AUTOREQ, 0, 0, 0, LEN_AND_STR("autoreq")},
{RPMTAG_AUTOPROV, 0, 0, 0, LEN_AND_STR("autoprov")},
{RPMTAG_DOCDIR, 0, 0, 0, LEN_AND_STR("docdir")},
{RPMTAG_DISTTAG, 0, 0, 1, LEN_AND_STR("disttag")},
{RPMTAG_BUGURL, 0, 0, 1, LEN_AND_STR("bugurl")},
{RPMTAG_ORDERNAME, 2, 0, 1, LEN_AND_STR("orderwithrequires")},
{RPMTAG_ORDERNAME, 2, 0, 0, LEN_AND_STR("orderwithrequires")},
{RPMTAG_REMOVEPATHPOSTFIXES,0, 0, 1, LEN_AND_STR("removepathpostfixes")},
{RPMTAG_MODULARITYLABEL, 0, 0, 1, LEN_AND_STR("modularitylabel")},
{0, 0, 0, 0}