From ab6e8dae1e9e3c96cd003b21825df61f553ebdc8 Mon Sep 17 00:00:00 2001 From: Paul Barker Date: Wed, 8 Jan 2020 11:25:45 +0000 Subject: wic: Preserve intermediate files When debugging issues or trying to add new features in wic it's useful to examine the intermediate files created by the tool such as images of the individual partitions. Previously these files were created in a subdirectory of IMGDEPLOYDIR and, deleted by wic itself and then the working subdirectory completely removed at the end of IMAGE_CMD_wic. Instead we should work in a staging directory named build-wic and leave behind intermediate files for analysis if necessary. This has the added benefit of allowing individual partition images to be preserved by adding commands to IMAGE_CMD_wic_append() in an image recipe if needed. This is useful where an update system requires exact sized and pre-formatted partition images for deployment. (From OE-Core rev: 07b6b284204e912b5d08bdd0ca51b766ab7dd9c1) Signed-off-by: Paul Barker Signed-off-by: Richard Purdie --- scripts/lib/wic/plugins/imager/direct.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py index 2441cc33ad..c50645ff76 100644 --- a/scripts/lib/wic/plugins/imager/direct.py +++ b/scripts/lib/wic/plugins/imager/direct.py @@ -580,9 +580,7 @@ class PartitionedImage(): self.native_sysroot) def cleanup(self): - # remove partition images - for image in set(self.partimages): - os.remove(image) + pass def assemble(self): logger.debug("Installing partitions") -- cgit v1.2.3-54-g00ecf