mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
image_types.bbclass: remove the old images
Remove the old image before the new one generated to save disk space when RM_OLD_IMAGE is set to 1, this is an easy way to keep the DEPLOY_DIR_IMAGE clean. [YOCTO #4391] (From OE-Core rev: b3e2e405c53d63bc71872d41f455507be833e7eb) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
995c196f98
commit
0948a237dd
@@ -51,7 +51,11 @@ def get_imagecmds(d):
|
|||||||
types.remove("live")
|
types.remove("live")
|
||||||
|
|
||||||
if d.getVar('IMAGE_LINK_NAME', True):
|
if d.getVar('IMAGE_LINK_NAME', True):
|
||||||
cmds += "\trm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*"
|
if d.getVar('RM_OLD_IMAGE', True) == "1":
|
||||||
|
# Remove the old image
|
||||||
|
cmds += "\trm -f `find ${DEPLOY_DIR_IMAGE} -maxdepth 1 -type l -name ${IMAGE_LINK_NAME}'.*' -exec readlink -f {} \;`"
|
||||||
|
# Remove the symlink
|
||||||
|
cmds += "\n\trm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*"
|
||||||
|
|
||||||
for type in types:
|
for type in types:
|
||||||
ccmd = []
|
ccmd = []
|
||||||
|
|||||||
Reference in New Issue
Block a user