[Rpm-maint] [PATCH 2/2] Use the _buildtime macro as buildtime if defined
Nicolas Vigier
boklm at mars-attacks.org
Wed Sep 25 10:20:09 UTC 2013
---
build/pack.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/build/pack.c b/build/pack.c
index 3be9a30..d545810 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -109,9 +109,15 @@ exit:
static rpm_time_t * getBuildTime(void)
{
static rpm_time_t buildTime[1];
+ int btMacro;
- if (buildTime[0] == 0)
- buildTime[0] = (int32_t) time(NULL);
+ if (buildTime[0] == 0) {
+ btMacro = rpmExpandNumeric("%{?_buildtime}");
+ if (btMacro != 0)
+ buildTime[0] = (int32_t) btMacro;
+ else
+ buildTime[0] = (int32_t) time(NULL);
+ }
return buildTime;
}
--
1.8.1.5
More information about the Rpm-maint
mailing list