summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/license.bbclass9
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 74a830686e..4b5954d2c5 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -103,10 +103,10 @@ license_create_manifest() {
103 103
104 pkged_pv="$(sed -n 's/^PV: //p' ${filename})" 104 pkged_pv="$(sed -n 's/^PV: //p' ${filename})"
105 pkged_name="$(basename $(readlink ${filename}))" 105 pkged_name="$(basename $(readlink ${filename}))"
106 pkged_lic="$(sed -n "/^LICENSE_${pkged_name}: /{ s/^LICENSE_${pkged_name}: //; s/[+|&()*]/ /g; s/ */ /g; p }" ${filename})" 106 pkged_lic="$(sed -n "/^LICENSE_${pkged_name}: /{ s/^LICENSE_${pkged_name}: //; s/[|&()*]/ /g; s/ */ /g; p }" ${filename})"
107 if [ -z ${pkged_lic} ]; then 107 if [ -z ${pkged_lic} ]; then
108 # fallback checking value of LICENSE 108 # fallback checking value of LICENSE
109 pkged_lic="$(sed -n "/^LICENSE: /{ s/^LICENSE: //; s/[+|&()*]/ /g; s/ */ /g; p }" ${filename})" 109 pkged_lic="$(sed -n "/^LICENSE: /{ s/^LICENSE: //; s/[|&()*]/ /g; s/ */ /g; p }" ${filename})"
110 fi 110 fi
111 111
112 echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_MANIFEST} 112 echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_MANIFEST}
@@ -114,8 +114,9 @@ license_create_manifest() {
114 echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_MANIFEST} 114 echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_MANIFEST}
115 echo "LICENSE: " >> ${LICENSE_MANIFEST} 115 echo "LICENSE: " >> ${LICENSE_MANIFEST}
116 for lic in ${pkged_lic}; do 116 for lic in ${pkged_lic}; do
117 if [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic}" ]; then 117 # to reference a license file trim trailing + symbol
118 echo ${lic}|sed s'/generic_//'g >> ${LICENSE_MANIFEST} 118 if [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic%+}" ]; then
119 echo ${lic} >> ${LICENSE_MANIFEST}
119 else 120 else
120 echo "WARNING: The license listed, " ${lic} " was not in the licenses collected for " ${pkged_pn} >> ${LICENSE_MANIFEST} 121 echo "WARNING: The license listed, " ${lic} " was not in the licenses collected for " ${pkged_pn} >> ${LICENSE_MANIFEST}
121 fi 122 fi