license.bbclass: fix missing of license files on ubuntu build host

The license_create_manifest function contains bashism, this will lead
to unexpected results on ubuntu build host, as sh is linked to dash on
ubuntu. Even if COPY_LIC_MANIFEST and COPY_LIC_DIRS are enabled, the
license files will still be missing on target.

This patch fixes the above problem.

[YOCTO #5549]

(From OE-Core master rev: 4df9daee5c732c0a20dabe8515577238a1508512)

(From OE-Core rev: 159e53f9402f1d1ceed8c6511c5874e199dea6e1)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Chen Qi 2013-11-18 15:20:44 +08:00 committed by Richard Purdie
parent 139920d199
commit 3656f81f3d
1 changed files with 2 additions and 2 deletions

View File

@ -72,9 +72,9 @@ license_create_manifest() {
# Really don't need to copy the generics as they're
# represented in the manifest and in the actual pkg licenses
# Doing so would make your image quite a bit larger
if [[ "${lic}" != "generic_"* ]]; then
if [ "${lic#generic_}" = "${lic}" ]; then
cp ${LICENSE_DIRECTORY}/${pkg}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}/${lic}
elif [[ "${lic}" == "generic_"* ]]; then
else
if [ ! -f ${IMAGE_ROOTFS}/usr/share/common-licenses/${lic} ]; then
cp ${LICENSE_DIRECTORY}/${pkg}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/
fi