summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeth Flanagan <elizabeth.flanagan@intel.com>2011-02-15 18:37:59 -0800
committerSaul Wold <sgw@linux.intel.com>2011-02-16 07:34:51 -0800
commit0e4aa13e9eef50533d8385b7fa638f33d4248e78 (patch)
tree230c94640685f1bb14b359544ef9c3eb4b42ce77
parent095944add91767856c41e4b2818ba63ea9415747 (diff)
downloadopenembedded-core-0e4aa13e9eef50533d8385b7fa638f33d4248e78.tar.gz
openembedded-core-0e4aa13e9eef50533d8385b7fa638f33d4248e78.tar.bz2
openembedded-core-0e4aa13e9eef50533d8385b7fa638f33d4248e78.zip
Doing uname without subprocess: buildstats.bbclass
Instead of using subprocess which is problematic, we should use platform instead. Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
-rw-r--r--meta/classes/buildstats.bbclass11
1 files changed, 7 insertions, 4 deletions
diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
index f042dd30fa..0acf516739 100644
--- a/meta/classes/buildstats.bbclass
+++ b/meta/classes/buildstats.bbclass
@@ -67,7 +67,7 @@ python run_buildstats () {
import bb.build
import bb.event
import bb.data
- import time, subprocess
+ import time, subprocess, platform
if isinstance(e, bb.event.BuildStarted):
##############################################
@@ -90,9 +90,12 @@ python run_buildstats () {
build_time = os.path.join(bsdir, "build_stats")
# write start of build into build_time
file = open(build_time,"a")
- # We do this here because subprocess within BuildStarted is messy
- #host_info = subprocess.Popen(["uname", "-a"], stdout=subprocess.PIPE).stdout.read()
- #file.write("Host Info: %s" % host_info)
+ host_info = platform.uname()
+ file.write("Host Info: ")
+ for x in host_info:
+ if x:
+ file.write(x + " ")
+ file.write("\n")
file.write("Build Started: %0.2f \n" % time.time())
file.close()