Backport Disttag: syntax to spec file parser and header content.

Original commit by jbj@ (10336f1):
- add Disttag: syntax to spec file parser and header
content.
This commit is contained in:
Gleb Fotengauer-Malinovskiy 2014-05-16 16:45:38 +04:00
parent 1efb40518c
commit 4ebe39ba25
2 changed files with 5 additions and 0 deletions

View File

@ -30,6 +30,7 @@ static rpmTag copyTagsDuringParse[] = {
RPMTAG_CHANGELOGTEXT,
RPMTAG_PREFIXES,
RPMTAG_BUILDHOST,
RPMTAG_DISTTAG,
0
};
@ -322,6 +323,7 @@ static struct optionalTag {
{ RPMTAG_DISTRIBUTION, "%{?distribution}" },
{ RPMTAG_DISTURL, "%{?disturl}" },
{ RPMTAG_BUILDHOST, "%{?buildhost}" },
{ RPMTAG_DISTTAG, "%{?disttag}"},
{ -1, NULL }
};
@ -505,6 +507,7 @@ static int handlePreambleTag(Spec spec, Package pkg, int tag, const char *macro,
case RPMTAG_VERSION:
case RPMTAG_RELEASE:
case RPMTAG_URL:
case RPMTAG_DISTTAG:
SINGLE_TOKEN_ONLY;
/* These macros are for backward compatibility */
if (tag == RPMTAG_VERSION) {
@ -747,6 +750,7 @@ static struct PreambleRec_s preambleList[] = {
{RPMTAG_AUTOREQ, 0, 0, "autoreq"},
{RPMTAG_AUTOPROV, 0, 0, "autoprov"},
{RPMTAG_DOCDIR, 0, 0, "docdir"},
{RPMTAG_DISTTAG, 0, 0, "disttag"},
/*@-nullassign@*/ /* LCL: can't add null annotation */
{0, 0, 0, 0}
/*@=nullassign@*/

View File

@ -416,6 +416,7 @@ typedef enum rpmTag_e {
RPMTAG_FILEDEPENDSN = 1144,
RPMTAG_DEPENDSDICT = 1145,
RPMTAG_SOURCEPKGID = 1146,
RPMTAG_DISTTAG = 1155, /* s */
/*@-enummemuse@*/
RPMTAG_FIRSTFREE_TAG /*!< internal */
/*@=enummemuse@*/