From 7ca03925d88d27266a4f8bec7a35e8c3b1117279 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 6 May 2019 16:08:30 +0300 Subject: [PATCH] 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 --- build/parsePreamble.c | 50 +++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/build/parsePreamble.c b/build/parsePreamble.c index a595a6f74..8d0dc58ff 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -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}