From: Ed Bartosh Date: Fri, 14 Jul 2017 12:33:01 +0000 (+0300) Subject: wic: isoimage: do not remove temp directory X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~20765 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc12ce9d1b92cc0104cf456af1e3d5f146b9219d;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git wic: isoimage: do not remove temp directory Removed isodir subrdirectory instead of removing temporary working directory as working directory can contain copy of rootfs partition and shouldn't be removed by any plugin. Signed-off-by: Ed Bartosh Signed-off-by: Ross Burton --- diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py index 85f35f7fbe4..ffa54299622 100644 --- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py +++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py @@ -204,8 +204,8 @@ class IsoImagePlugin(SourcePlugin): """ isodir = "%s/ISO/" % cr_workdir - if os.path.exists(cr_workdir): - shutil.rmtree(cr_workdir) + if os.path.exists(isodir): + shutil.rmtree(isodir) install_cmd = "install -d %s " % isodir exec_cmd(install_cmd)