diff options
author | Kristian Amlie <kristian.amlie@mender.io> | 2017-03-09 15:37:09 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-11 16:09:14 +0000 |
commit | 0cfcdf2e95fafa9ff9e7b0490d1860a87ba83744 (patch) | |
tree | 52a4c8d2129575fc20828b35641f248d752c2149 | |
parent | d5df9dd30fa28b9a8e8eb44abe96ed8be470d652 (diff) | |
download | poky-0cfcdf2e95fafa9ff9e7b0490d1860a87ba83744.tar.gz |
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.
(From OE-Core rev: f1a3eac376c4600cdb128d870ad9b7e9d51ed9c0)
Signed-off-by: Kristian Amlie <kristian.amlie@mender.io>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | scripts/lib/wic/plugins/imager/direct.py | 2 |
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(): | |||
547 | 547 | ||
548 | def cleanup(self): | 548 | def cleanup(self): |
549 | # remove partition images | 549 | # remove partition images |
550 | for image in self.partimages: | 550 | for image in set(self.partimages): |
551 | os.remove(image) | 551 | os.remove(image) |
552 | 552 | ||
553 | def assemble(self): | 553 | def assemble(self): |