summaryrefslogtreecommitdiff
path: root/build/pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'build/pack.c')
-rw-r--r--build/pack.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/build/pack.c b/build/pack.c
index 6480cecaa..b6c808e09 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -330,7 +330,28 @@ static rpmRC writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileNam
rasprintf(cookie, "%s %d", buildHost(), (int) (*getBuildTime()));
headerPutString(h, RPMTAG_COOKIE, *cookie);
}
-
+
+ /*
+ * Add system-wide Tizen build information
+ */
+ char *buildinfo = rpmExpand("%{?_buildinfo}", NULL);
+ if (buildinfo && *buildinfo) {
+ int err;
+ int count = 0;
+ char **strings = NULL;
+
+ if ((err = poptParseArgvString(buildinfo, &count, &strings))) {
+ rpmlog(RPMLOG_ERR, _("Can't parse BUILDINFO tag: %s\n"), poptStrerror(xx));
+ goto exit;
+ }
+
+ if (count)
+ headerPutStringArray(h, RPMTAG_BUILDINFO, strings, count);
+
+ strings = _free(strings);
+ }
+ free(buildinfo);
+
/* Reallocate the header into one contiguous region. */
h = headerReload(h, RPMTAG_HEADERIMMUTABLE);
if (h == NULL) { /* XXX can't happen */