summaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
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() {
68 if [ "${COPY_LIC_DIRS}" = "1" ]; then 68 if [ "${COPY_LIC_DIRS}" = "1" ]; then
69 for pkg in ${INSTALLED_PKGS}; do 69 for pkg in ${INSTALLED_PKGS}; do
70 mkdir -p ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg} 70 mkdir -p ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}
71 for lic in `ls ${LICENSE_DIRECTORY}/${pkg}`; do 71 pkged_pn="$(oe-pkgdata-util lookup-recipe ${PKGDATA_DIR} ${pkg})"
72 for lic in `ls ${LICENSE_DIRECTORY}/${pkged_pn}`; do
72 # Really don't need to copy the generics as they're 73 # Really don't need to copy the generics as they're
73 # represented in the manifest and in the actual pkg licenses 74 # represented in the manifest and in the actual pkg licenses
74 # Doing so would make your image quite a bit larger 75 # Doing so would make your image quite a bit larger
75 if [ "${lic#generic_}" = "${lic}" ]; then 76 if [ "${lic#generic_}" = "${lic}" ]; then
76 cp ${LICENSE_DIRECTORY}/${pkg}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}/${lic} 77 cp ${LICENSE_DIRECTORY}/${pkged_pn}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}/${lic}
77 else 78 else
78 if [ ! -f ${IMAGE_ROOTFS}/usr/share/common-licenses/${lic} ]; then 79 if [ ! -f ${IMAGE_ROOTFS}/usr/share/common-licenses/${lic} ]; then
79 cp ${LICENSE_DIRECTORY}/${pkg}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/ 80 cp ${LICENSE_DIRECTORY}/${pkged_pn}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/
80 fi 81 fi
81 ln -s ../${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}/${lic} 82 ln -s ../${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}/${lic}
82 fi 83 fi