summaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2015-03-19 13:17:53 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-22 08:50:03 +0000
commitd70c981b83bbfdda9a16e1e237c2f9b4088f4491 (patch)
tree3342cfd9b8b1daa3bb0263066d130ddf735a1628 /meta/classes/license.bbclass
parent19ad6b6c5dffe3cb1fc658a2a49fe5291108b8c2 (diff)
downloadpoky-d70c981b83bbfdda9a16e1e237c2f9b4088f4491.tar.gz
license.bbclass: skip license checking if the package contains no file
If the package doesn't contain any file, then the license isn't relevant as far as the final image is concerned. So we skip the license checking in license_create_manifest if such case. (From OE-Core rev: f7b6684d2248f4a56e70b292891f9a454275449d) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r--meta/classes/license.bbclass8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 95e01213c0..73a0e9727e 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -50,6 +50,7 @@ license_create_manifest() {
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}: //; p }" ${filename})" 52 pkged_lic="$(sed -n "/^LICENSE_${pkged_name}: /{ s/^LICENSE_${pkged_name}: //; p }" ${filename})"
53 pkged_size="$(sed -n "/^PKGSIZE_${pkged_name}: /{ s/^PKGSIZE_${pkged_name}: //; p }" ${filename})"
53 if [ -z "${pkged_lic}" ]; then 54 if [ -z "${pkged_lic}" ]; then
54 # fallback checking value of LICENSE 55 # fallback checking value of LICENSE
55 pkged_lic="$(sed -n "/^LICENSE: /{ s/^LICENSE: //; p }" ${filename})" 56 pkged_lic="$(sed -n "/^LICENSE: /{ s/^LICENSE: //; p }" ${filename})"
@@ -61,6 +62,13 @@ license_create_manifest() {
61 echo "LICENSE:" ${pkged_lic} >> ${LICENSE_MANIFEST} 62 echo "LICENSE:" ${pkged_lic} >> ${LICENSE_MANIFEST}
62 echo "" >> ${LICENSE_MANIFEST} 63 echo "" >> ${LICENSE_MANIFEST}
63 64
65 # If the package doesn't contain any file, that is, its size is 0, the license
66 # isn't relevant as far as the final image is concerned. So doing license check
67 # doesn't make much sense, skip it.
68 if [ "$pkged_size" = "0" ]; then
69 continue
70 fi
71
64 lics="$(echo ${pkged_lic} | sed "s/[|&()*]/ /g" | sed "s/ */ /g" )" 72 lics="$(echo ${pkged_lic} | sed "s/[|&()*]/ /g" | sed "s/ */ /g" )"
65 for lic in ${lics}; do 73 for lic in ${lics}; do
66 # to reference a license file trim trailing + symbol 74 # to reference a license file trim trailing + symbol