summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2014-06-26 15:16:55 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-06-29 09:04:22 +0100
commit442efc3959a65fc9da73f79b3afda95d1cffadf3 (patch)
tree6aff0f7c35dc7348912113189d3d159e00edda61 /meta
parent0ae5aadc6b1faa893dcdea768d9ce22463f0cdff (diff)
downloadpoky-442efc3959a65fc9da73f79b3afda95d1cffadf3.tar.gz
patch.bbclass: unset TMPDIR after use
GNU Patch < 2.6.1 has a race condition so we create a per-instance TMPDIR to avoid this. This was implemented by setting os.environ[TMPDIR] but at the end of do_patch the temporary directory is deleted but TMPDIR is not unset. In general this doesn't cause a problem but if do_patch is embedded in a larger function then TMPDIR is set to a directory that doesn't exist. Avoid this by removing TMPDIR from os.environ when the directory is deleted. (From OE-Core rev: 51ea4378864f1468df2ca282a84f78a17d6861aa) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/patch.bbclass1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/classes/patch.bbclass b/meta/classes/patch.bbclass
index 86c65b3b8d..1e2aab0418 100644
--- a/meta/classes/patch.bbclass
+++ b/meta/classes/patch.bbclass
@@ -177,6 +177,7 @@ python patch_do_patch() {
177 bb.fatal(str(e)) 177 bb.fatal(str(e))
178 178
179 bb.utils.remove(process_tmpdir, True) 179 bb.utils.remove(process_tmpdir, True)
180 del os.environ['TMPDIR']
180} 181}
181patch_do_patch[vardepsexclude] = "PATCHRESOLVE" 182patch_do_patch[vardepsexclude] = "PATCHRESOLVE"
182 183