From 186f85746668b0dfa8d887248a1384db298af5f5 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Mon, 7 Jun 2010 20:50:05 +0200 Subject: [PATCH] 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 +'" (Bitbake rev: ec1f2773b4811b3beb52710120bb5a9b215c174e) Signed-off-by: Bernhard Reutner-Fischer Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 9d21b33143..2b38065de2 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -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):