]> code.ossystems Code Review - openembedded-core.git/commitdiff
license.bbclass: include all licenses in the manifest
authorChristopher Larson <chris_larson@mentor.com>
Mon, 10 Jun 2013 23:15:50 +0000 (16:15 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 11 Jun 2013 14:47:09 +0000 (15:47 +0100)
When we don't have a generic license file for the license in question, we can
warn, but we should still include it in the manifest, otherwise the manifest
doesn't reflect reality. Failing to include a license listed in the recipe in
the manifest can't be allowed.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/license.bbclass

index 76749c4c29689c931ee2f3c86889bbf69bea9ccc..2ca47cc1982f887e0040aa2eaceeaccf9e6c8e2d 100644 (file)
@@ -51,11 +51,10 @@ license_create_manifest() {
                printf "LICENSE:" >> ${LICENSE_MANIFEST}
                for lic in ${pkged_lic}; do
                        # to reference a license file trim trailing + symbol
-                       if [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic%+}" ]; then
-                               printf " ${lic}" >> ${LICENSE_MANIFEST}
-                       else
-                               echo "WARNING: The license listed ${lic} was not in the licenses collected for ${pkged_pn}"
+                       if ! [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic%+}" ]; then
+                               bbwarn "The license listed ${lic} was not in the licenses collected for ${pkged_pn}"
                        fi
+                        printf " ${lic}" >> ${LICENSE_MANIFEST}
                done
                printf "\n\n" >> ${LICENSE_MANIFEST}
        done