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.
This commit is contained in:
Steve Lawrence 2010-06-21 17:04:36 -04:00 committed by Panu Matilainen
parent d6795bee66
commit 0158708305
3 changed files with 6 additions and 0 deletions

View 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}
};

View 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 */

View File

@ -80,6 +80,7 @@ CHANGELOGNAME
CHANGELOGTEXT
CHANGELOGTIME
CLASSDICT
COLLECTIONS
CONFLICTFLAGS
CONFLICTNAME
CONFLICTS