From: Chen Qi Date: Mon, 18 Nov 2013 07:20:44 +0000 (+0800) Subject: license.bbclass: fix missing of license files on ubuntu build host X-Git-Tag: rev_ivi_2015_02_04~10305 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dc7e42005484315136eebc8c482006a463ab964c;p=scm%2Fbb%2Ftizen-distro.git 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 rev: 4df9daee5c732c0a20dabe8515577238a1508512) Signed-off-by: Chen Qi Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index 6d7ee94..7fe47b2 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass @@ -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