mirror of
https://git.yoctoproject.org/poky
synced 2026-02-26 19:39:40 +01:00
wic: debug mode to keep tmp directory
files in wic tmp directory can be usefull for debugging, so do not remove tmp directory when wic create run with debugging mode (-D or --debug). also update wic.Wic.test_debug_short and wic.Wic.test_debug_long to check for tmp directory. [YOCTO#14216] (From OE-Core rev: 04d334d5bc5353c39c5059d25d97f111a9e368d9) Signed-off-by: Lee Chee Yang <Chee.Yang.Lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a122e2418b67d38f691edcf8dd846c167d6b4fa9) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
1874f7f505
commit
e63e8599d8
@@ -54,6 +54,7 @@ class DirectPlugin(ImagerPlugin):
|
||||
self.native_sysroot = native_sysroot
|
||||
self.oe_builddir = oe_builddir
|
||||
|
||||
self.debug = options.debug
|
||||
self.outdir = options.outdir
|
||||
self.compressor = options.compressor
|
||||
self.bmap = options.bmap
|
||||
@@ -274,8 +275,9 @@ class DirectPlugin(ImagerPlugin):
|
||||
if os.path.isfile(path):
|
||||
shutil.move(path, os.path.join(self.outdir, fname))
|
||||
|
||||
# remove work directory
|
||||
shutil.rmtree(self.workdir, ignore_errors=True)
|
||||
# remove work directory when it is not in debugging mode
|
||||
if not self.debug:
|
||||
shutil.rmtree(self.workdir, ignore_errors=True)
|
||||
|
||||
# Overhead of the MBR partitioning scheme (just one sector)
|
||||
MBR_OVERHEAD = 1
|
||||
|
||||
Reference in New Issue
Block a user