summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorElizabeth Flanagan <elizabeth.flanagan@intel.com>2012-02-24 14:17:39 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-24 23:24:34 +0000
commit2c753a714c1ee2b7c6479836f47aeec182ca3670 (patch)
tree40da0b1729817e6127236f87ed3dc9fc605235ae /meta
parentd50dd280f52587b6225bc5db3c9e85f78107f5f5 (diff)
downloadopenembedded-core-2c753a714c1ee2b7c6479836f47aeec182ca3670.tar.gz
openembedded-core-2c753a714c1ee2b7c6479836f47aeec182ca3670.tar.bz2
openembedded-core-2c753a714c1ee2b7c6479836f47aeec182ca3670.zip
license.bbclass: Symbolic links of generic license
This is to reduce the size of licenses added to images. With this commit license.manifest, original license and generic license adds about .5M to a core-image-minimal image, substantially less than what is currently occuring when COPY_LIC_MANIFEST and COPY_LIC_DIRS are set. Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/license.bbclass16
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() {
# Two options here:
# - Just copy the manifest
# - Copy the manifest and the license directories
- # This will make your image a bit larger, however
- # if you are concerned about license compliance
- # and delivery this should cover all your bases
-
+ # With both options set we see a .5 M increase in core-image-minimal
if [ -n "${COPY_LIC_MANIFEST}" ]; then
mkdir -p ${IMAGE_ROOTFS}/usr/share/common-licenses/
cp ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest ${IMAGE_ROOTFS}/usr/share/common-licenses/license.manifest
if [ -n "${COPY_LIC_DIRS}" ]; then
for pkg in ${INSTALLED_PKGS}; do
mkdir -p ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}
- for lic in `ls ${LICENSE_DIRECTORY}/${pkged_pn}`; do
+ for lic in `ls ${LICENSE_DIRECTORY}/${pkg}`; 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_*" ]; then
- cp ${LICENSE_DIRECTORY}/${pkged_pn}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}/${lic}
+ if [[ "${lic}" != "generic_"* ]]; then
+ cp ${LICENSE_DIRECTORY}/${pkg}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}/${lic}
+ elif [[ "${lic}" == "generic_"* ]]; then
+ if [ ! -f ${IMAGE_ROOTFS}/usr/share/common-licenses/${lic} ]; then
+ cp ${LICENSE_DIRECTORY}/${pkg}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/
+ fi
+ ln -s ../${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}/${lic}
fi
done
done