diff options
| author | Hongxu Jia <hongxu.jia@windriver.com> | 2013-11-20 18:35:39 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-02-09 11:04:14 +0000 |
| commit | e58a1499accd74d3e6fe4f899711d4c680ebc18f (patch) | |
| tree | 2893dae98fccaa7c91e8ca5cedcdfa5a66eb296f /meta | |
| parent | a39125ce011b33421b5c1f2fee143637c323b948 (diff) | |
| download | poky-e58a1499accd74d3e6fe4f899711d4c680ebc18f.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]
(From OE-Core master rev: 8968f9a3461912c8de217135f3691c86e2a58e86)
(From OE-Core rev: 49a8573e8645830c7fce5fba9dd0b1c97b09e181)
Signed-off-by: Hongxu Jia <hongxu.jia@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>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/classes/license.bbclass | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index b00ebb12e2..247b154f80 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass | |||
| @@ -68,15 +68,16 @@ license_create_manifest() { | |||
| 68 | if [ -n "${COPY_LIC_DIRS}" ]; then | 68 | if [ -n "${COPY_LIC_DIRS}" ]; 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 |
