summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2012-05-29 22:53:06 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-30 12:04:45 +0100
commite40995e569289598a1d9d71e19734402f2b54718 (patch)
tree108328e272a149da0e27dec0e0f0bebe602b80b8 /meta/classes/kernel.bbclass
parente4c35790d6dc23a0933f188f52fa4434784e1d98 (diff)
downloadpoky-e40995e569289598a1d9d71e19734402f2b54718.tar.gz
meta: replace os.system with subprocess.call
Replace os.system with subprocess.call since the older function would fail (more or less) silently if the executed program cannot be found More info: http://docs.python.org/library/subprocess.html#subprocess-replacements [YOCTO #2454] (From OE-Core rev: a07d03cc6f67c88feb9813ae7deb6e4a93552dfe) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 90af59712c..116e10b9de 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -313,12 +313,12 @@ module_conf_rfcomm = "alias bt-proto-3 rfcomm"
313 313
314python populate_packages_prepend () { 314python populate_packages_prepend () {
315 def extract_modinfo(file): 315 def extract_modinfo(file):
316 import tempfile, re 316 import tempfile, re, subprocess
317 tempfile.tempdir = d.getVar("WORKDIR", True) 317 tempfile.tempdir = d.getVar("WORKDIR", True)
318 tf = tempfile.mkstemp() 318 tf = tempfile.mkstemp()
319 tmpfile = tf[1] 319 tmpfile = tf[1]
320 cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("PATH", True), d.getVar("HOST_PREFIX", True) or "", file, tmpfile) 320 cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("PATH", True), d.getVar("HOST_PREFIX", True) or "", file, tmpfile)
321 os.system(cmd) 321 subprocess.call(cmd, shell=True)
322 f = open(tmpfile) 322 f = open(tmpfile)
323 l = f.read().split("\000") 323 l = f.read().split("\000")
324 f.close() 324 f.close()