mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
kernel.bbclass: Add fix from OE.dev for tmpnam() usage
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -292,13 +292,16 @@ module_conf_rfcomm = "alias bt-proto-3 rfcomm"
|
|||||||
|
|
||||||
python populate_packages_prepend () {
|
python populate_packages_prepend () {
|
||||||
def extract_modinfo(file):
|
def extract_modinfo(file):
|
||||||
import re
|
import tempfile, re
|
||||||
tmpfile = os.tmpnam()
|
tempfile.tempdir = bb.data.getVar("WORKDIR", d, 1)
|
||||||
|
tf = tempfile.mkstemp()
|
||||||
|
tmpfile = tf[1]
|
||||||
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)
|
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)
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
f = open(tmpfile)
|
f = open(tmpfile)
|
||||||
l = f.read().split("\000")
|
l = f.read().split("\000")
|
||||||
f.close()
|
f.close()
|
||||||
|
os.close(tf[0])
|
||||||
os.unlink(tmpfile)
|
os.unlink(tmpfile)
|
||||||
exp = re.compile("([^=]+)=(.*)")
|
exp = re.compile("([^=]+)=(.*)")
|
||||||
vals = {}
|
vals = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user