Skip to contentSkip to conversation

classes/license.bbclass: Improve generic license copy validation.

PATCH In review Aníbal Limón 3 participants 3 messages Jun 24, 2015 – Jun 26, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 classes/license.bbclass: Improve generic license copy validation.

Remove + char in any position for cover cases when license has the form like GPL-2.0+-with-OpenSSL-exception.

[YOCTO #7584]

---
 meta/classes/license.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/classes/license.bbclass +5 -1
index 73a0e97..e00a695 100644
@@ -71,8 +71,12 @@ license_create_manifest() {
 
 		lics="$(echo ${pkged_lic} | sed "s/[|&()*]/ /g" | sed "s/  */ /g" )"
 		for lic in ${lics}; do
+			# 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
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 31 lines · Aníbal Limón

Remove + char in any position for cover cases when license has the form like GPL-2.0+-with-OpenSSL-exception.

[YOCTO #7584]

---
 meta/classes/license.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/classes/license.bbclass +5 -2
index 73a0e97..e00a695 100644
@@ -71,8 +71,12 @@ license_create_manifest() {
 
                lics="$(echo ${pkged_lic} | sed "s/[|&()*]/ /g" | sed "s/  */ /g" )"
                for lic in ${lics}; do
+                       # 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
--

1.9.1

Quoted 1 line

--

This looks like the right fix for this for right now.

Quoted 4 lines

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 3 lines
Elizabeth Flanagan
Yocto Project
Build and Release
#2 lore raw
In reply to Aníbal Limón
Quoted 4 lines · Aníbal Limón

Remove + char in any position for cover cases when license has the form like GPL-2.0+-with-OpenSSL-exception.

[YOCTO #7584]

Thanks Aníbal,

This is queued in my fido-next branch[1].

Regards,

Joshua

1. http://cgit.openembedded.org/openembedded-core
-contrib/log/?h=joshuagl/fido-next

Quoted 35 lines
---
 meta/classes/license.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/classes/license.bbclass +0 -0
index 73a0e97..e00a695 100644
@@ -71,8 +71,12 @@ license_create_manifest() {
 
 		lics="$(echo ${pkged_lic} | sed "s/[|&()*]/ /g" | 

sed "s/ */ /g" )"

meta/classes/license.bbclass +1 -0
 		for lic in ${lics}; do
+			# remove + chars in any position this cover 

cases like

meta/classes/license.bbclass +4 -2
+			# 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

meta/classes/license.bbclass +1 -0
+			if ! [ -e 

"${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic}" ]; then
bbwarn "The license listed ${lic}
was not in the licenses collected for ${pkged_pn}"

meta/classes/license.bbclass +0 -0
 			fi
 		done
Signature · 1 line
1.9.1