From 5cb7569c4848235db23c073200682d70aa7fc722 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 26 Jul 2005 13:45:10 +0000 Subject: bitbake/bin/bitbake: -Inject a BUILDSTART variable into each parsed file --- bin/bitbake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/bitbake b/bin/bitbake index 4ed72f4f4..b44682d0e 100755 --- a/bin/bitbake +++ b/bin/bitbake @@ -21,7 +21,7 @@ # this program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. -import sys, os, getopt, glob, copy, os.path, re +import sys, os, getopt, glob, copy, os.path, re, time sys.path.append(os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib')) import bb from bb import utils, data, parse, debug, event, fatal @@ -601,8 +601,10 @@ class BBCooker: self.showEnvironment() sys.exit( 0 ) + # inject custom variables if not bb.data.getVar("BUILDNAME", self.configuration.data): bb.data.setVar("BUILDNAME", os.popen('date +%Y%m%d%H%M').readline().strip(), self.configuration.data) + bb.data.setVar("BUILDSTART", time.strftime('%m/%d/%Y %H:%M:%S',time.localtime()),self.configuration.data) buildname = bb.data.getVar("BUILDNAME", self.configuration.data) -- cgit 1.2.3-korg