summaryrefslogtreecommitdiff
path: root/build/parsePreamble.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-02-23 11:02:46 -0500
committerPanu Matilainen <pmatilai@redhat.com>2010-10-12 17:05:17 +0300
commiteea47aa9a7e7779cb35e8e6e690424427fe243c1 (patch)
treebfde4456307bf3daa537146268dedacbce6d7ee7 /build/parsePreamble.c
parent22053e0daecdb180f45a7c74cba04ab16825f262 (diff)
downloadlibrpm-tizen-eea47aa9a7e7779cb35e8e6e690424427fe243c1.tar.gz
librpm-tizen-eea47aa9a7e7779cb35e8e6e690424427fe243c1.tar.bz2
librpm-tizen-eea47aa9a7e7779cb35e8e6e690424427fe243c1.zip
Add 'VCS' key
Spec files have a lot of metadata about a project. However one of the most key components is the upstream version control system which was notably lacking. Resolve this by adding a "VCS" key. There is no specification for contents of this key, given that the set of version control systems (and features thereof) are not well-defined. However, recommendations are: * git: This URL should be in a form that can be passed to "git clone", with the additional feature that an optional fragment identifier "#foo" denotes a branch or tag.
Diffstat (limited to 'build/parsePreamble.c')
-rw-r--r--build/parsePreamble.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/build/parsePreamble.c b/build/parsePreamble.c
index 717f077f8..33e52e3ea 100644
--- a/build/parsePreamble.c
+++ b/build/parsePreamble.c
@@ -33,6 +33,7 @@ static const rpmTag copyTagsDuringParse[] = {
RPMTAG_VENDOR,
RPMTAG_ICON,
RPMTAG_URL,
+ RPMTAG_VCS,
RPMTAG_CHANGELOGTIME,
RPMTAG_CHANGELOGNAME,
RPMTAG_CHANGELOGTEXT,
@@ -700,6 +701,8 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag,
case RPMTAG_URL:
case RPMTAG_DISTTAG:
case RPMTAG_BUGURL:
+ /* XXX TODO: validate format somehow */
+ case RPMTAG_VCS:
SINGLE_TOKEN_ONLY;
headerPutString(pkg->header, tag, field);
break;
@@ -884,6 +887,7 @@ static struct PreambleRec_s const preambleList[] = {
{RPMTAG_GROUP, 1, 0, LEN_AND_STR("group")},
{RPMTAG_PACKAGER, 0, 0, LEN_AND_STR("packager")},
{RPMTAG_URL, 0, 0, LEN_AND_STR("url")},
+ {RPMTAG_VCS, 0, 0, LEN_AND_STR("vcs")},
{RPMTAG_SOURCE, 0, 0, LEN_AND_STR("source")},
{RPMTAG_PATCH, 0, 0, LEN_AND_STR("patch")},
{RPMTAG_NOSOURCE, 0, 0, LEN_AND_STR("nosource")},