cooker: use time.strftime() instead of spawing sh with date

time.strftime() defaults to using time.localtime(), use that instead
of spawning "sh -c 'date +<FMT>'"

(Bitbake rev: ec1f2773b4811b3beb52710120bb5a9b215c174e)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
Bernhard Reutner-Fischer 2010-06-07 20:50:05 +02:00 committed by Richard Purdie
parent 0405011734
commit 186f857466
1 changed files with 1 additions and 1 deletions

View File

@ -609,7 +609,7 @@ class BBCooker:
Setup any variables needed before starting a build
"""
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("BUILDNAME", time.strftime('%Y%m%d%H%M'), self.configuration.data)
bb.data.setVar("BUILDSTART", time.strftime('%m/%d/%Y %H:%M:%S', time.gmtime()), self.configuration.data)
def matchFiles(self, buildfile):