summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/license.bbclass13
1 files changed, 7 insertions, 6 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index ea4c8801e9..c55ee77ebf 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -49,24 +49,25 @@ license_create_manifest() {
49 49
50 pkged_pv="$(sed -n 's/^PV: //p' ${filename})" 50 pkged_pv="$(sed -n 's/^PV: //p' ${filename})"
51 pkged_name="$(basename $(readlink ${filename}))" 51 pkged_name="$(basename $(readlink ${filename}))"
52 pkged_lic="$(sed -n "/^LICENSE_${pkged_name}: /{ s/^LICENSE_${pkged_name}: //; s/[|&()*]/ /g; s/ */ /g; p }" ${filename})" 52 pkged_lic="$(sed -n "/^LICENSE_${pkged_name}: /{ s/^LICENSE_${pkged_name}: //; p }" ${filename})"
53 if [ -z ${pkged_lic} ]; then 53 if [ -z ${pkged_lic} ]; then
54 # fallback checking value of LICENSE 54 # fallback checking value of LICENSE
55 pkged_lic="$(sed -n "/^LICENSE: /{ s/^LICENSE: //; s/[|&()*]/ /g; s/ */ /g; p }" ${filename})" 55 pkged_lic="$(sed -n "/^LICENSE: /{ s/^LICENSE: //; p }" ${filename})"
56 fi 56 fi
57 57
58 echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_MANIFEST} 58 echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_MANIFEST}
59 echo "PACKAGE VERSION:" ${pkged_pv} >> ${LICENSE_MANIFEST} 59 echo "PACKAGE VERSION:" ${pkged_pv} >> ${LICENSE_MANIFEST}
60 echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_MANIFEST} 60 echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_MANIFEST}
61 printf "LICENSE:" >> ${LICENSE_MANIFEST} 61 echo "LICENSE:" ${pkged_lic} >> ${LICENSE_MANIFEST}
62 for lic in ${pkged_lic}; do 62 echo "" >> ${LICENSE_MANIFEST}
63
64 lics="$(echo ${pkged_lic} | sed "s/[|&()*]/ /g" | sed "s/ */ /g" )"
65 for lic in ${lics}; do
63 # to reference a license file trim trailing + symbol 66 # to reference a license file trim trailing + symbol
64 if ! [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic%+}" ]; then 67 if ! [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic%+}" ]; then
65 bbwarn "The license listed ${lic} was not in the licenses collected for ${pkged_pn}" 68 bbwarn "The license listed ${lic} was not in the licenses collected for ${pkged_pn}"
66 fi 69 fi
67 printf " ${lic}" >> ${LICENSE_MANIFEST}
68 done 70 done
69 printf "\n\n" >> ${LICENSE_MANIFEST}
70 done 71 done
71 72
72 # Two options here: 73 # Two options here: