Add new Collections preamble tag
authorSteve Lawrence <slawrence@tresys.com>
Mon, 21 Jun 2010 21:04:36 +0000 (17:04 -0400)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 22 Jun 2010 08:12:43 +0000 (11:12 +0300)
This adds a new Collections preamble tag, which contains a space separated list
of collection names that the package belongs to.

build/parsePreamble.c
lib/rpmtag.h
tests/rpmgeneral.at

index a4a8750..b2a4670 100644 (file)
@@ -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}
 };
 
index 6fd4b0f..2a8a9d6 100644 (file)
@@ -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 */
index 86e4537..4c33f29 100644 (file)
@@ -80,6 +80,7 @@ CHANGELOGNAME
 CHANGELOGTEXT
 CHANGELOGTIME
 CLASSDICT
+COLLECTIONS
 CONFLICTFLAGS
 CONFLICTNAME
 CONFLICTS