summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2004-09-30 20:18:40 +0000
committerjbj <devnull@localhost>2004-09-30 20:18:40 +0000
commit10336f101cd2798c8eb64335f8cc57baadea6454 (patch)
tree093274484df58772298903c679f2543b889c0e5f /build
parent40409429140f8db038e62291ba92630f3928ca74 (diff)
downloadlibrpm-tizen-10336f101cd2798c8eb64335f8cc57baadea6454.tar.gz
librpm-tizen-10336f101cd2798c8eb64335f8cc57baadea6454.tar.bz2
librpm-tizen-10336f101cd2798c8eb64335f8cc57baadea6454.zip
- add Disttag: syntax to spec file parser and header content.
- define Suggests:/Enhances: and Priority: tag values. CVS patchset: 7424 CVS date: 2004/09/30 20:18:40
Diffstat (limited to 'build')
-rw-r--r--build/parsePreamble.c13
1 files changed, 9 insertions, 4 deletions
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);