summaryrefslogtreecommitdiffstats
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:25:52 +0000
commitd7cef163e412addbac1a85ffd5134795b18cb347 (patch)
treeb03fb51a1c7bbbed7448ee4efa06f287a936672d
parent5272e883ffe9f4b67ec0929730c43e6ad439d2a4 (diff)
downloadpoky-d7cef163e412addbac1a85ffd5134795b18cb347.tar.gz
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. (From OE-Core rev: 2c753a714c1ee2b7c6479836f47aeec182ca3670) Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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() {
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