diff options
author | Laurentiu Palcu <laurentiu.palcu@intel.com> | 2014-03-28 15:07:40 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-30 10:10:33 +0100 |
commit | 5b594449f73f6cff99695119eb00ee5dcc672aed (patch) | |
tree | f03af84449869f17af24b8f86a20e9494604f550 /meta | |
parent | 0f757af31fc4c0e36cb8cf6054e59b4213c73b24 (diff) | |
download | ast2050-yocto-poky-5b594449f73f6cff99695119eb00ee5dcc672aed.zip ast2050-yocto-poky-5b594449f73f6cff99695119eb00ee5dcc672aed.tar.gz |
image.py: check file exists before deleting
When RM_OLD_IMAGE = "1", we delete old images but we didn't check they
actually exist...
[YOCTO #6029]
(From OE-Core rev: 8910d3cc94899ab4d509e681b438ae96218fa777)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oe/image.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py index a03b73e..c9b9033 100644 --- a/meta/lib/oe/image.py +++ b/meta/lib/oe/image.py @@ -192,7 +192,8 @@ class Image(ImageDepGraph): if img.find(self.d.getVar('IMAGE_LINK_NAME', True)) == 0: img = os.path.join(deploy_dir, img) if os.path.islink(img): - if self.d.getVar('RM_OLD_IMAGE', True) == "1": + if self.d.getVar('RM_OLD_IMAGE', True) == "1" and \ + os.path.exists(os.path.realpath(img)): os.remove(os.path.realpath(img)) os.remove(img) |