summaryrefslogtreecommitdiff
path: root/scripts/lib/wic
diff options
context:
space:
mode:
authorKristian Amlie <kristian.amlie@mender.io>2017-03-09 15:37:09 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-11 16:08:49 +0000
commitf1a3eac376c4600cdb128d870ad9b7e9d51ed9c0 (patch)
tree5e1b14f54a0194579de91f6e62e5cfd6116848e3 /scripts/lib/wic
parent12aa82b8b07b03d20e63479469faca6562c78a05 (diff)
downloadopenembedded-core-f1a3eac376c4600cdb128d870ad9b7e9d51ed9c0.tar.gz
openembedded-core-f1a3eac376c4600cdb128d870ad9b7e9d51ed9c0.tar.bz2
openembedded-core-f1a3eac376c4600cdb128d870ad9b7e9d51ed9c0.zip
wic/direct.py: Avoid exception if using multiple rawcopy/no-table entries.
If we are both having a bootloader and a U-Boot environment file, we can end up with two entries using "--source rawcopy" and "--no-table", and since they reuse the same file [1], their cleanup handlers will try to delete the same file twice. So make sure we only do it once. [1] Although they reuse the same file, the resulting output is correct, so it appears the file is accessed in properly sequential order. Signed-off-by: Kristian Amlie <kristian.amlie@mender.io> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/lib/wic')
-rw-r--r--scripts/lib/wic/plugins/imager/direct.py2
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 b7e324aab6..235eb24f59 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -547,7 +547,7 @@ class PartitionedImage():
def cleanup(self):
# remove partition images
- for image in self.partimages:
+ for image in set(self.partimages):
os.remove(image)
def assemble(self):