summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2012-07-17 12:38:00 +0000
committerKoen Kooi <koen@dominion.thruhere.net>2012-10-17 08:55:09 +0200
commit623337a4de73b6eab8c189f21f081cfe4465acc5 (patch)
tree40a6de99e76f6768887c64d6df3d6c810064ce6b
parentfeb548551e26cb8131f3418868c477537e3026a5 (diff)
downloadmeta-openembedded-623337a4de73b6eab8c189f21f081cfe4465acc5.tar.gz
kernel.bbclass: 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] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
-rw-r--r--meta-oe/classes/kernel.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta-oe/classes/kernel.bbclass b/meta-oe/classes/kernel.bbclass
index f68d8a9c3..d5b3914ab 100644
--- a/meta-oe/classes/kernel.bbclass
+++ b/meta-oe/classes/kernel.bbclass
@@ -315,12 +315,12 @@ module_conf_rfcomm = "alias bt-proto-3 rfcomm"
315 315
316python populate_packages_prepend () { 316python populate_packages_prepend () {
317 def extract_modinfo(file): 317 def extract_modinfo(file):
318 import tempfile, re 318 import tempfile, re, subprocess
319 tempfile.tempdir = d.getVar("WORKDIR", True) 319 tempfile.tempdir = d.getVar("WORKDIR", True)
320 tf = tempfile.mkstemp() 320 tf = tempfile.mkstemp()
321 tmpfile = tf[1] 321 tmpfile = tf[1]
322 cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("PATH", True), d.getVar("HOST_PREFIX", True) or "", file, tmpfile) 322 cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("PATH", True), d.getVar("HOST_PREFIX", True) or "", file, tmpfile)
323 os.system(cmd) 323 subprocess.call(cmd, shell=True)
324 f = open(tmpfile) 324 f = open(tmpfile)
325 l = f.read().split("\000") 325 l = f.read().split("\000")
326 f.close() 326 f.close()