summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-01 12:27:20 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-01 12:27:20 +0000
commit2d9cc7ec314055cd8e2d25df633540bd7ced6885 (patch)
tree4eb79b505c14aa6217013c4624cc0b08c26715a4 /meta/classes/kernel.bbclass
parent5b7e96d852778f1164198040cbd165241ea51e40 (diff)
downloadpoky-2d9cc7ec314055cd8e2d25df633540bd7ced6885.tar.gz
kernel.bbclass: Add fix from OE.dev for tmpnam() usage
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass7
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 9d3b2bbd8a..59de148cc8 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -292,13 +292,16 @@ module_conf_rfcomm = "alias bt-proto-3 rfcomm"
292 292
293python populate_packages_prepend () { 293python populate_packages_prepend () {
294 def extract_modinfo(file): 294 def extract_modinfo(file):
295 import re 295 import tempfile, re
296 tmpfile = os.tmpnam() 296 tempfile.tempdir = bb.data.getVar("WORKDIR", d, 1)
297 tf = tempfile.mkstemp()
298 tmpfile = tf[1]
297 cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (bb.data.getVar("PATH", d, 1), bb.data.getVar("HOST_PREFIX", d, 1) or "", file, tmpfile) 299 cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (bb.data.getVar("PATH", d, 1), bb.data.getVar("HOST_PREFIX", d, 1) or "", file, tmpfile)
298 os.system(cmd) 300 os.system(cmd)
299 f = open(tmpfile) 301 f = open(tmpfile)
300 l = f.read().split("\000") 302 l = f.read().split("\000")
301 f.close() 303 f.close()
304 os.close(tf[0])
302 os.unlink(tmpfile) 305 os.unlink(tmpfile)
303 exp = re.compile("([^=]+)=(.*)") 306 exp = re.compile("([^=]+)=(.*)")
304 vals = {} 307 vals = {}