Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Eric Bénard" <eric@eukrea.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] license.bbclass: remove existing license.manifest before appending new data
Date: Thu, 29 Mar 2012 14:22:29 +0200	[thread overview]
Message-ID: <1333023749-31830-1-git-send-email-eric@eukrea.com> (raw)

without this fix, we append license each time we build again the same image,
ending with a large not up to date file.

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 meta/classes/license.bbclass |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 394a6d4..c85233c 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -79,6 +79,10 @@ license_create_manifest() {
 	# Get list of installed packages
 	list_installed_packages | grep -v "locale" |sort > ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest
 	INSTALLED_PKGS=`cat ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest`
+	# remove existing license.manifest file
+	if [ -f ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest ]; then
+		rm ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
+	fi
 	# list of installed packages is broken for deb
 	for pkg in ${INSTALLED_PKGS}; do
 		# not the best way to do this but licenses are not arch dependant iirc
-- 
1.7.7.6




             reply	other threads:[~2012-03-29 12:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-29 12:22 Eric Bénard [this message]
2012-03-29 21:24 ` [PATCH] license.bbclass: remove existing license.manifest before appending new data Richard Purdie
2012-03-29 23:22 ` Chris Larson
2012-03-30  6:20   ` Eric Bénard
2012-03-30 22:41     ` Chris Larson

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=1333023749-31830-1-git-send-email-eric@eukrea.com \
    --to=eric@eukrea.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox