[oe-commits] Eric Bénard : license.bbclass: remove existing license .manifest before appending new data

git at git.openembedded.org git at git.openembedded.org
Thu Mar 29 15:54:36 UTC 2012


Module: openembedded-core.git
Branch: master
Commit: 2d49a8f659694b60cdb706e8993cd9550e2002bd
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=2d49a8f659694b60cdb706e8993cd9550e2002bd

Author: Eric Bénard <eric at eukrea.com>
Date:   Thu Mar 29 14:22:29 2012 +0200

license.bbclass: remove existing license.manifest before appending new data

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 at eukrea.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 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





More information about the Openembedded-commits mailing list