summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Bénard <eric@eukrea.com>2012-03-29 14:22:29 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-29 14:25:23 +0100
commit2d49a8f659694b60cdb706e8993cd9550e2002bd (patch)
tree2ba8b51bb643e2bb5eea202a6477ba0c5a47fa4e
parent8fe53bdc807184bc41469d8587368b31192e6252 (diff)
downloadopenembedded-core-2d49a8f659694b60cdb706e8993cd9550e2002bd.tar.gz
openembedded-core-2d49a8f659694b60cdb706e8993cd9550e2002bd.tar.bz2
openembedded-core-2d49a8f659694b60cdb706e8993cd9550e2002bd.zip
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@eukrea.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/license.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 394a6d4480..c85233c7a6 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