diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2015-03-19 13:17:53 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-03-21 09:45:44 +0000 |
commit | f7b6684d2248f4a56e70b292891f9a454275449d (patch) | |
tree | 270a753d5bff21114a70c4ff29ad47b8aae7ef2f /meta/classes | |
parent | 3cdbdb63631cf6e2a59142f86407fb430e633897 (diff) | |
download | openembedded-core-f7b6684d2248f4a56e70b292891f9a454275449d.tar.gz openembedded-core-f7b6684d2248f4a56e70b292891f9a454275449d.tar.bz2 openembedded-core-f7b6684d2248f4a56e70b292891f9a454275449d.zip |
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.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/license.bbclass | 8 |
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() { pkged_pv="$(sed -n 's/^PV: //p' ${filename})" pkged_name="$(basename $(readlink ${filename}))" pkged_lic="$(sed -n "/^LICENSE_${pkged_name}: /{ s/^LICENSE_${pkged_name}: //; p }" ${filename})" + pkged_size="$(sed -n "/^PKGSIZE_${pkged_name}: /{ s/^PKGSIZE_${pkged_name}: //; p }" ${filename})" if [ -z "${pkged_lic}" ]; then # fallback checking value of LICENSE pkged_lic="$(sed -n "/^LICENSE: /{ s/^LICENSE: //; p }" ${filename})" @@ -61,6 +62,13 @@ license_create_manifest() { echo "LICENSE:" ${pkged_lic} >> ${LICENSE_MANIFEST} echo "" >> ${LICENSE_MANIFEST} + # If the package doesn't contain any file, that is, its size is 0, the license + # isn't relevant as far as the final image is concerned. So doing license check + # doesn't make much sense, skip it. + if [ "$pkged_size" = "0" ]; then + continue + fi + lics="$(echo ${pkged_lic} | sed "s/[|&()*]/ /g" | sed "s/ */ /g" )" for lic in ${lics}; do # to reference a license file trim trailing + symbol |