image_types.bbclass: remove the obsolete images
cover image_types.bbclass: remove the obsolete images
The following changes since commit 3472c1f7ab409cd91c1d4782d9e00880b84e3ae8:
grub-efi-native: Cleanup whitespace (2013-05-03 16:37:05 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib robert/rm_old
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/rm_old
Robert Yang (1):
image_types.bbclass: remove the obsolete images
meta/classes/image_types.bbclass | 6 +++++- meta/conf/local.conf.sample.extended | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.1.2
PATCH 1/1 image_types.bbclass: remove the obsolete images
Remove the obsolete image before the new one generated to save disk space when RM_OBSOLETE_IMAGE is set to 1, this is an easy way to keep the DEPLOY_DIR_IMAGE clean.
[YOCTO #4391]
--- meta/classes/image_types.bbclass | 6 +++++- meta/conf/local.conf.sample.extended | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-)
meta/classes/image_types.bbclass +5 -1
@@ -51,7 +51,11 @@ def get_imagecmds(d): types.remove("live") if d.getVar('IMAGE_LINK_NAME', True): - cmds += "\trm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*" + if d.getVar('RM_OBSOLETE_IMAGE', True) == "1": + # Remove the obsolete 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: ccmd = []
meta/conf/local.conf.sample.extended +3 -0
@@ -207,3 +207,6 @@ #ARCHIVER_MODE[filter] ?= "no" #ARCHIVER_CLASS = "${@'archive-${ARCHIVER_MODE}-source' if ARCHIVER_MODE != 'none' else ''}" #INHERIT += "${ARCHIVER_CLASS}" + +# Remove the obsolete image before the new one generated to save disk space +#RM_OBSOLETE_IMAGE = "1"
Signature · 1 line
1.8.1.2
Quoted 38 lines · On Tuesday 07 May 2013 18:26:59 Robert Yang wrote:
Remove the obsolete image before the new one generated to save disk space when
RM_OBSOLETE_IMAGEis set to 1, this is an easy way to keep theDEPLOY_DIR_IMAGEclean.[YOCTO #4391]
Signed-off-by Robert Yang <[email protected]>--- meta/classes/image_types.bbclass | 6 +++++- meta/conf/local.conf.sample.extended | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-)(quoted diff) +0
-0b/meta/classes/image_types.bbclass index 94837ae..27f232e 100644
meta/classes/image_types.bbclass +3
-2@@ -51,7 +51,11 @@ def get_imagecmds(d): types.remove("live") if d.getVar('IMAGE_LINK_NAME', True): - cmds += "\trm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*" + if d.getVar('RM_OBSOLETE_IMAGE', True) == "1": + # Remove the obsolete image + cmds += "\trm -f `find ${DEPLOY_DIR_IMAGE} -maxdepth 1 -type l -name ${IMAGE_LINK_NAME}'.*' -exec readlink -f {} \;`" + # Removethe symlink
meta/classes/image_types.bbclass +1
-0+ cmds += "\n\trm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*" for type in types: ccmd = [](quoted diff) +0
-0b/meta/conf/local.conf.sample.extended index 1d1a8ec..efe0804 100644
meta/conf/local.conf.sample.extended +0
-0@@ -207,3 +207,6 @@ #ARCHIVER_MODE[filter] ?= "no" #ARCHIVER_CLASS = "${@'archive-${ARCHIVER_MODE}-source' if ARCHIVER_MODE !='none' else ''}" #INHERIT += "${ARCHIVER_CLASS}"
meta/conf/local.conf.sample.extended line 212
Quoted 3 lines
meta/conf/local.conf.sample.extended +3
-0+ +# Remove the obsolete image before the new one generated to save disk space +#RM_OBSOLETE_IMAGE = "1"
Rather than "obsolete" I would have said "old" would be the preferred terminology here, i.e. RM_OLD_IMAGE.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Quoted 29 lines · Paul Eggleton
Quoted 28 lines · On Tuesday 07 May 2013 18:26:59 Robert Yang wrote:
Remove the obsolete image before the new one generated to save disk space when
RM_OBSOLETE_IMAGEis set to 1, this is an easy way to keep theDEPLOY_DIR_IMAGEclean.[YOCTO #4391]
Signed-off-by Robert Yang <[email protected]>--- meta/classes/image_types.bbclass | 6 +++++- meta/conf/local.conf.sample.extended | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-)(quoted diff) +0
-0b/meta/classes/image_types.bbclass index 94837ae..27f232e 100644
meta/classes/image_types.bbclass +3
-2@@ -51,7 +51,11 @@ def get_imagecmds(d): types.remove("live") if d.getVar('IMAGE_LINK_NAME', True): - cmds += "\trm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*" + if d.getVar('RM_OBSOLETE_IMAGE', True) == "1": + # Remove the obsolete image + cmds += "\trm -f `find ${DEPLOY_DIR_IMAGE} -maxdepth 1 -type l -name ${IMAGE_LINK_NAME}'.*' -exec readlink -f {} \;`" + # Removethe symlink
+ cmds += "\n\trm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*"
Quoted 17 lines
meta/conf/local.conf.sample.extended line 212
Quoted 13 lines
for type in types:
ccmd = [](quoted diff) +0
-0b/meta/conf/local.conf.sample.extended index 1d1a8ec..efe0804 100644
meta/conf/local.conf.sample.extended +0
-0@@ -207,3 +207,6 @@ #ARCHIVER_MODE[filter] ?= "no" #ARCHIVER_CLASS = "${@'archive-${ARCHIVER_MODE}-source' if ARCHIVER_MODE !='none' else ''}" #INHERIT += "${ARCHIVER_CLASS}"
meta/conf/local.conf.sample.extended +3
-0+ +# Remove the obsolete image before the new one generated to save disk space +#RM_OBSOLETE_IMAGE = "1"Rather than "obsolete" I would have said "old" would be the preferred terminology here, i.e.
RM_OLD_IMAGE.
Thanks, I've updated the git repo:
git://git.pokylinux.org/poky-contrib robert/rm_old
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/rm_old
// Robert
Quoted 3 lines
Cheers,
Paul
Ping.
// Robert
Quoted 16 lines · Robert Yang
The following changes since commit
3472c1f7ab409cd91c1d4782d9e00880b84e3ae8:grub-efi-native: Cleanup whitespace (2013-05-03 16:37:05 +0100)are available in the git repository at:
git://git.pokylinux.org/poky-contribrobert/rm_old
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/rm_oldRobert Yang (1):
image_types.bbclass: remove the obsolete imagesmeta/classes/image_types.bbclass | 6 +++++- meta/conf/local.conf.sample.extended | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-)
Quoted 14 lines · Robert Yang
Ping.
// Robert
Quoted 8 lines · Robert Yang
The following changes since commit
3472c1f7ab409cd91c1d4782d9e00880b84e3ae8:grub-efi-native: Cleanup whitespace (2013-05-03 16:37:05 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contribrobert/rm_old
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/rm_old
looks like a good change
Quoted 13 lines
Quoted 8 lines
Robert Yang (1):
image_types.bbclass: remove the obsolete imagesmeta/classes/image_types.bbclass | 6 +++++- meta/conf/local.conf.sample.extended | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-)_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core