]> code.ossystems Code Review - openembedded-core.git/commitdiff
classes/license.bbclass: Improve generic license copy validation.
authorAníbal Limón <anibal.limon@linux.intel.com>
Wed, 24 Jun 2015 16:49:42 +0000 (11:49 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 28 Jun 2015 08:42:03 +0000 (09:42 +0100)
Remove + char in any position for cover cases when license has
the form like GPL-2.0+-with-OpenSSL-exception.

[YOCTO #7584]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
meta/classes/license.bbclass

index fdc117010e9b2932f5c809ccb9fc4f342761176d..b62910bf264b863f4a085d9e7046e9aa3bc16cb9 100644 (file)
@@ -76,8 +76,12 @@ license_create_manifest() {
                                continue
                        fi
 
+                       # remove + chars in any position this cover cases like
+                       # GPL-2.0+-with-OpenSSL-exception -> GPL-2.0-with-OpenSSL-exception
+                       lic="$(echo ${lic} | sed "s/\+//g")"
+
                        # to reference a license file trim trailing + symbol
-                       if ! [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic%+}" ]; then
+                       if ! [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic}" ]; then
                                bbwarn "The license listed ${lic} was not in the licenses collected for ${pkged_pn}"
                        fi
                done