diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2005-07-26 13:45:10 +0000 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2005-07-26 13:45:10 +0000 |
commit | 5cb7569c4848235db23c073200682d70aa7fc722 (patch) | |
tree | 461a4371fa57c8ec3c2a20cd9e7af67de8f118bf | |
parent | fb071a9b8e971f3050d1d129df24ecc35d7c5cd5 (diff) | |
download | bitbake-5cb7569c4848235db23c073200682d70aa7fc722.tar.gz |
bitbake/bin/bitbake:
-Inject a BUILDSTART variable into each parsed file
-rwxr-xr-x | bin/bitbake | 4 |
1 files changed, 3 insertions, 1 deletions
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) |