From 015870830503700b1aa7921407752792a8388792 Mon Sep 17 00:00:00 2001 From: Steve Lawrence Date: Mon, 21 Jun 2010 17:04:36 -0400 Subject: [PATCH] Add new Collections preamble tag This adds a new Collections preamble tag, which contains a space separated list of collection names that the package belongs to. --- build/parsePreamble.c | 4 ++++ lib/rpmtag.h | 1 + tests/rpmgeneral.at | 1 + 3 files changed, 6 insertions(+) diff --git a/build/parsePreamble.c b/build/parsePreamble.c index a4a8750..b2a4670 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -663,6 +663,9 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag, spec->BANames = _free(spec->BANames); break; } + case RPMTAG_COLLECTIONS: + addOrAppendListEntry(pkg->header, tag, field); + break; default: rpmlog(RPMLOG_ERR, _("Internal error: Bogus tag %d\n"), tag); return RPMRC_FAIL; @@ -730,6 +733,7 @@ static struct PreambleRec_s const preambleList[] = { {RPMTAG_DOCDIR, 0, 0, LEN_AND_STR("docdir")}, {RPMTAG_DISTTAG, 0, 0, LEN_AND_STR("disttag")}, {RPMTAG_BUGURL, 0, 0, LEN_AND_STR("bugurl")}, + {RPMTAG_COLLECTIONS, 0, 0, LEN_AND_STR("collections")}, {0, 0, 0, 0} }; diff --git a/lib/rpmtag.h b/lib/rpmtag.h index 6fd4b0f..2a8a9d6 100644 --- a/lib/rpmtag.h +++ b/lib/rpmtag.h @@ -265,6 +265,7 @@ typedef enum rpmTag_e { RPMTAG_BUILDOBSOLETES = 1194, /* internal (unimplemented) */ RPMTAG_DBINSTANCE = 1195, /* i extension */ RPMTAG_NVRA = 1196, /* s extension */ + RPMTAG_COLLECTIONS = 1197, /* s[] list of collections */ RPMTAG_FILENAMES = 5000, /* s[] extension */ RPMTAG_FILEPROVIDE = 5001, /* s[] extension */ RPMTAG_FILEREQUIRE = 5002, /* s[] extension */ diff --git a/tests/rpmgeneral.at b/tests/rpmgeneral.at index 86e4537..4c33f29 100644 --- a/tests/rpmgeneral.at +++ b/tests/rpmgeneral.at @@ -80,6 +80,7 @@ CHANGELOGNAME CHANGELOGTEXT CHANGELOGTIME CLASSDICT +COLLECTIONS CONFLICTFLAGS CONFLICTNAME CONFLICTS -- 2.7.4