summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--build/parsePreamble.c13
-rw-r--r--lib/rpmlib.h8
3 files changed, 19 insertions, 4 deletions
diff --git a/CHANGES b/CHANGES
index a6541ae7a..55a8f7a35 100644
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,8 @@
- add --all-name option (finds every lang file); drop defattr()
from *.lang files (arekm,mkochano,pascalek,wiget@PLD).
- add type to tag array.
+ - add Disttag: syntax to spec file parser and header content.
+ - define Suggests:/Enhances: and Priority: tag values.
4.3.1 -> 4.3.2:
- use /etc/selinux/targeted/contexts/files/file_contexts for now.
diff --git a/build/parsePreamble.c b/build/parsePreamble.c
index 16d3b123c..d14e2cec8 100644
--- a/build/parsePreamble.c
+++ b/build/parsePreamble.c
@@ -30,6 +30,7 @@ static rpmTag copyTagsDuringParse[] = {
RPMTAG_CHANGELOGTEXT,
RPMTAG_PREFIXES,
RPMTAG_RHNPLATFORM,
+ RPMTAG_DISTTAG,
0
};
@@ -458,8 +459,8 @@ extern int noLang;
/**
*/
/*@-boundswrite@*/
-static int handlePreambleTag(Spec spec, Package pkg, int tag, const char *macro,
- const char *lang)
+static int handlePreambleTag(Spec spec, Package pkg, rpmTag tag,
+ const char *macro, const char *lang)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies spec->macros, spec->st, spec->buildRootURL,
spec->sources, spec->numSources, spec->noSource,
@@ -513,6 +514,7 @@ static int handlePreambleTag(Spec spec, Package pkg, int tag, const char *macro,
case RPMTAG_RELEASE:
case RPMTAG_URL:
case RPMTAG_RHNPLATFORM:
+ case RPMTAG_DISTTAG:
SINGLE_TOKEN_ONLY;
/* These macros are for backward compatibility */
if (tag == RPMTAG_VERSION) {
@@ -775,6 +777,7 @@ static struct PreambleRec_s preambleList[] = {
{RPMTAG_AUTOPROV, 0, 0, "autoprov"},
{RPMTAG_DOCDIR, 0, 0, "docdir"},
{RPMTAG_RHNPLATFORM, 0, 0, "rhnplatform"},
+ {RPMTAG_DISTTAG, 0, 0, "disttag"},
/*@-nullassign@*/ /* LCL: can't add null annotation */
{0, 0, 0, 0}
/*@=nullassign@*/
@@ -794,7 +797,7 @@ static inline void initPreambleList(void)
/**
*/
/*@-boundswrite@*/
-static int findPreambleTag(Spec spec, /*@out@*/int * tag,
+static int findPreambleTag(Spec spec, /*@out@*/rpmTag * tag,
/*@null@*/ /*@out@*/ const char ** macro, /*@out@*/ char * lang)
/*@modifies *tag, *macro, *lang @*/
{
@@ -855,7 +858,7 @@ static int findPreambleTag(Spec spec, /*@out@*/int * tag,
int parsePreamble(Spec spec, int initialPackage)
{
int nextPart;
- int tag, rc, xx;
+ int rc, xx;
char *name, *linep;
int flag;
Package pkg;
@@ -897,6 +900,8 @@ int parsePreamble(Spec spec, int initialPackage)
return rc;
while (! (nextPart = isPart(spec->line))) {
const char * macro;
+ rpmTag tag;
+
/* Skip blank lines */
linep = spec->line;
SKIPSPACE(linep);
diff --git a/lib/rpmlib.h b/lib/rpmlib.h
index b7f6edcb6..d82a62eab 100644
--- a/lib/rpmlib.h
+++ b/lib/rpmlib.h
@@ -429,6 +429,14 @@ typedef enum rpmTag_e {
RPMTAG_POSTTRANS = 1152, /* s */
RPMTAG_PRETRANSPROG = 1153, /* s */
RPMTAG_POSTTRANSPROG = 1154, /* s */
+ RPMTAG_DISTTAG = 1155, /* s */
+ RPMTAG_SUGGESTSNAME = 1156, /* s[] extension placeholder */
+ RPMTAG_SUGGESTSVERSION = 1157, /* s[] extension placeholder */
+ RPMTAG_SUGGESTSFLAGS = 1158, /* i extension placeholder */
+ RPMTAG_ENHANCESNAME = 1159, /* s[] extension placeholder */
+ RPMTAG_ENHANCESVERSION = 1160, /* s[] extension placeholder */
+ RPMTAG_ENHANCESFLAGS = 1161, /* i extension placeholder */
+ RPMTAG_PRIORITY = 1162, /* i extension placeholder */
/*@-enummemuse@*/
RPMTAG_FIRSTFREE_TAG /*!< internal */
/*@=enummemuse@*/