aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2013-11-20 18:35:39 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-09 18:01:37 +0000
commit8968f9a3461912c8de217135f3691c86e2a58e86 (patch)
tree867b7009b13e86996827546577a8b5d6539355af /meta/classes/license.bbclass
parent963315939610a89b031346ebf93cd5bddc7773d2 (diff)
downloadopenembedded-core-contrib-8968f9a3461912c8de217135f3691c86e2a58e86.tar.gz
license.bbclass: fix copying license directories failed
For each recipe, it populated license files to ${LICENSE_DIRECTORY}/${PN}, such as kernel's license dir was ${LICENSE_DIRECTORY}/kernel-3.10.17-yocto-standard; In do_rootfs task, it copied license directories from ${LICENSE_DIRECTORY}/ ${pkg}, and ${pkg} was listed in ${INSTALLED_PKGS}; We got ${INSTALLED_PKGS} by rpm query, such as the kernel were 'kernel-*', but the kernel's PN was linux-yocto, so searching ${LICENSE_DIRECTORY}/ kernel-* failed. Copied license directories from ${LICENSE_DIRECTORY}/${PN} fixed this issue. [YOCTO #5572] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r--meta/classes/license.bbclass7
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 7fe47b2e4b..8ad55f8031 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -68,15 +68,16 @@ license_create_manifest() {
if [ "${COPY_LIC_DIRS}" = "1" ]; then
for pkg in ${INSTALLED_PKGS}; do
mkdir -p ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}
- for lic in `ls ${LICENSE_DIRECTORY}/${pkg}`; do
+ pkged_pn="$(oe-pkgdata-util lookup-recipe ${PKGDATA_DIR} ${pkg})"
+ for lic in `ls ${LICENSE_DIRECTORY}/${pkged_pn}`; do
# 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_}" = "${lic}" ]; then
- cp ${LICENSE_DIRECTORY}/${pkg}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}/${lic}
+ cp ${LICENSE_DIRECTORY}/${pkged_pn}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}/${lic}
else
if [ ! -f ${IMAGE_ROOTFS}/usr/share/common-licenses/${lic} ]; then
- cp ${LICENSE_DIRECTORY}/${pkg}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/
+ cp ${LICENSE_DIRECTORY}/${pkged_pn}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/
fi
ln -s ../${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}/${lic}
fi