From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: Robert Yang <liezhi.yang@windriver.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/1] image_types.bbclass: remove the obsolete images
Date: Tue, 07 May 2013 11:32:33 +0100 [thread overview]
Message-ID: <3028968.i58Z539hxi@helios> (raw)
In-Reply-To: <7d839cdf354d6851be9c20c391344ce21413cf45.1367921762.git.liezhi.yang@windriver.com>
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_IMAGE is set to 1, this is an easy way to keep
> the DEPLOY_DIR_IMAGE clean.
>
> [YOCTO #4391]
>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
> meta/classes/image_types.bbclass | 6 +++++-
> meta/conf/local.conf.sample.extended | 3 +++
> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/image_types.bbclass
> b/meta/classes/image_types.bbclass index 94837ae..27f232e 100644
> --- a/meta/classes/image_types.bbclass
> +++ b/meta/classes/image_types.bbclass
> @@ -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 = []
> diff --git a/meta/conf/local.conf.sample.extended
> b/meta/conf/local.conf.sample.extended index 1d1a8ec..efe0804 100644
> --- a/meta/conf/local.conf.sample.extended
> +++ b/meta/conf/local.conf.sample.extended
> @@ -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"
Rather than "obsolete" I would have said "old" would be the preferred
terminology here, i.e. RM_OLD_IMAGE.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
next prev parent reply other threads:[~2013-05-07 10:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-07 10:26 [PATCH 0/1] image_types.bbclass: remove the obsolete images Robert Yang
2013-05-07 10:26 ` [PATCH 1/1] " Robert Yang
2013-05-07 10:32 ` Paul Eggleton [this message]
2013-05-07 10:41 ` Robert Yang
2013-05-17 2:14 ` [PATCH 0/1] " Robert Yang
2013-05-17 2:39 ` Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3028968.i58Z539hxi@helios \
--to=paul.eggleton@linux.intel.com \
--cc=liezhi.yang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.