diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2014-12-22 17:30:45 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-25 08:18:12 +0000 |
commit | 101c3bf7f573dd624ecfa24f1a5c44f8abadfe40 (patch) | |
tree | 3428fc1944e1e058783e9d1550fe4352efdbe316 /meta | |
parent | c924c07dab6caee8b6000a2dfcc60345fd678037 (diff) | |
download | poky-101c3bf7f573dd624ecfa24f1a5c44f8abadfe40.tar.gz |
license_class: fix license.manifest shows LICENSE field differently to recipe
Drop removal of [|&()*] operators in pkged_lic because this removal is only
needed to validate if license is collected.
[YOCTO #6757]
(From OE-Core rev: 57e5f74382d51f2a8df00e18b6008e3d2b44ad1a)
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/license.bbclass | 13 |
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: |