]> code.ossystems Code Review - openembedded-core.git/commitdiff
license.bbclass: remove existing license.manifest before appending new data
authorEric Bénard <eric@eukrea.com>
Thu, 29 Mar 2012 12:22:29 +0000 (14:22 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 29 Mar 2012 13:25:23 +0000 (14:25 +0100)
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>
meta/classes/license.bbclass

index 394a6d44807a96050f12e238b158a9da8002c9e4..c85233c7a621c6b2298f4499cbaa48406b4d8e39 100644 (file)
@@ -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