From d74c9667b3cbc6a0631b5cda6e7ed7d1facd2fcb Mon Sep 17 00:00:00 2001 From: Jader H. Silva Date: Thu, 12 Mar 2009 10:10:12 -0300 Subject: [PATCH] Kernel bbclass "too many open files" bugfix --- classes/kernel.bbclass | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index 86f00da..4c1dbda 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -295,12 +295,14 @@ python populate_packages_prepend () { def extract_modinfo(file): import tempfile, os, re tempfile.tempdir = bb.data.getVar("WORKDIR", d, 1) - tmpfile = tempfile.mkstemp()[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) os.system(cmd) f = open(tmpfile) l = f.read().split("\000") f.close() + os.close(tf[0]) os.unlink(tmpfile) exp = re.compile("([^=]+)=(.*)") vals = {} -- 1.5.6.3