[oe-commits] [openembedded-core] 08/25: wic/direct.py: Avoid exception if using multiple rawcopy/no-table entries.
git at git.openembedded.org
git at git.openembedded.org
Sat Mar 11 16:09:45 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit f1a3eac376c4600cdb128d870ad9b7e9d51ed9c0
Author: Kristian Amlie <kristian.amlie at mender.io>
AuthorDate: Thu Mar 9 15:37:09 2017 +0100
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 at mender.io>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
scripts/lib/wic/plugins/imager/direct.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index b7e324a..235eb24 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):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list