diff options
| -rw-r--r-- | meta/classes/license.bbclass | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index 11908d90da..cfc9eafb93 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass | |||
| @@ -106,22 +106,24 @@ license_create_manifest() { | |||
| 106 | # Two options here: | 106 | # Two options here: |
| 107 | # - Just copy the manifest | 107 | # - Just copy the manifest |
| 108 | # - Copy the manifest and the license directories | 108 | # - Copy the manifest and the license directories |
| 109 | # This will make your image a bit larger, however | 109 | # With both options set we see a .5 M increase in core-image-minimal |
| 110 | # if you are concerned about license compliance | ||
| 111 | # and delivery this should cover all your bases | ||
| 112 | |||
| 113 | if [ -n "${COPY_LIC_MANIFEST}" ]; then | 110 | if [ -n "${COPY_LIC_MANIFEST}" ]; then |
| 114 | mkdir -p ${IMAGE_ROOTFS}/usr/share/common-licenses/ | 111 | mkdir -p ${IMAGE_ROOTFS}/usr/share/common-licenses/ |
| 115 | cp ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest ${IMAGE_ROOTFS}/usr/share/common-licenses/license.manifest | 112 | cp ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest ${IMAGE_ROOTFS}/usr/share/common-licenses/license.manifest |
| 116 | if [ -n "${COPY_LIC_DIRS}" ]; then | 113 | if [ -n "${COPY_LIC_DIRS}" ]; then |
| 117 | for pkg in ${INSTALLED_PKGS}; do | 114 | for pkg in ${INSTALLED_PKGS}; do |
| 118 | mkdir -p ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg} | 115 | mkdir -p ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg} |
| 119 | for lic in `ls ${LICENSE_DIRECTORY}/${pkged_pn}`; do | 116 | for lic in `ls ${LICENSE_DIRECTORY}/${pkg}`; do |
| 120 | # Really don't need to copy the generics as they're | 117 | # Really don't need to copy the generics as they're |
| 121 | # represented in the manifest and in the actual pkg licenses | 118 | # represented in the manifest and in the actual pkg licenses |
| 122 | # Doing so would make your image quite a bit larger | 119 | # Doing so would make your image quite a bit larger |
| 123 | if [ ! ${lic} = "generic_*" ]; then | 120 | if [[ "${lic}" != "generic_"* ]]; then |
| 124 | cp ${LICENSE_DIRECTORY}/${pkged_pn}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}/${lic} | 121 | cp ${LICENSE_DIRECTORY}/${pkg}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}/${lic} |
| 122 | elif [[ "${lic}" == "generic_"* ]]; then | ||
| 123 | if [ ! -f ${IMAGE_ROOTFS}/usr/share/common-licenses/${lic} ]; then | ||
| 124 | cp ${LICENSE_DIRECTORY}/${pkg}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/ | ||
| 125 | fi | ||
| 126 | ln -s ../${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}/${lic} | ||
| 125 | fi | 127 | fi |
| 126 | done | 128 | done |
| 127 | done | 129 | done |
