diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2017-02-02 15:32:58 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-02-02 17:37:45 +0000 |
commit | 14652a42d81adf0340b580342a316a37996b0d37 (patch) | |
tree | 30bc4fbea9e179abff6326be161ca79bcc3a3fb6 /scripts | |
parent | 81ef850314fe471e3b290bbeed724564dee48044 (diff) | |
download | poky-14652a42d81adf0340b580342a316a37996b0d37.tar.gz |
wic: direct: fix creation of work directory
It was a typo in current code: mktemp was used instead of
mkdtemp to create work directory. This is fixed by using
mkdtemp.
Create work directory as a subdirectory of output directory
to make sure both are on the same partition to make moving
of result image faster.
This also fixes possible disk space issues as mkdtemp uses
TMPDIR, TEMP or TMP environment variables to get default value
of its 'dir' parameter. Those variables are usually pointing
to /tmp, which is not the best location to create huge images.
(From OE-Core rev: e6579b4e007ce89000c46c09917fbd3c72f18a73)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/wic/plugins/imager/direct.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py index 4637fbf302..b38e876758 100644 --- a/scripts/lib/wic/plugins/imager/direct.py +++ b/scripts/lib/wic/plugins/imager/direct.py | |||
@@ -122,7 +122,7 @@ class DirectImageCreator: | |||
122 | """ | 122 | """ |
123 | self.name = name | 123 | self.name = name |
124 | self.outdir = outdir | 124 | self.outdir = outdir |
125 | self.workdir = tempfile.mktemp(prefix='wic') | 125 | self.workdir = tempfile.mkdtemp(dir=outdir, prefix='tmp.wic.') |
126 | self.ks = ksobj | 126 | self.ks = ksobj |
127 | 127 | ||
128 | self._image = None | 128 | self._image = None |