diff options
author | Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> | 2012-09-11 04:13:43 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-12 14:44:54 +0100 |
commit | 0ac50f848cf0f897333cff9340976519fc95fdc4 (patch) | |
tree | 28e60e197c6b5a79cd37eb508b2eb8a975d81510 /meta/classes/license.bbclass | |
parent | ec3ec1e7388c2175f41527d5e5e07c6bb14a8f6e (diff) | |
download | openembedded-core-0ac50f848cf0f897333cff9340976519fc95fdc4.tar.gz openembedded-core-0ac50f848cf0f897333cff9340976519fc95fdc4.tar.bz2 openembedded-core-0ac50f848cf0f897333cff9340976519fc95fdc4.zip |
classes/license: define LICENSE_MANIFEST variable
Cosmetic change, saves space and reduces code line length.
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r-- | meta/classes/license.bbclass | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index 432e580390..0335f4195c 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass @@ -80,9 +80,10 @@ license_create_manifest() { # Get list of installed packages list_installed_packages | grep -v "locale" |sort > ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest INSTALLED_PKGS=`cat ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest` + LICENSE_MANIFEST="${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest" # remove existing license.manifest file - if [ -f ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest ]; then - rm ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest + if [ -f ${LICENSE_MANIFEST} ]; then + rm ${LICENSE_MANIFEST} fi # list of installed packages is broken for deb for pkg in ${INSTALLED_PKGS}; do @@ -95,18 +96,18 @@ license_create_manifest() { if ! grep -q "PACKAGE NAME: ${pkg}" ${filename}; then # exclude local recipes if [ ! "${pkged_pn}" = "*locale*" ]; then - echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest - echo "PACKAGE VERSION:" ${pkged_pv} >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest - echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest - echo "LICENSE: " >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest + echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_MANIFEST} + echo "PACKAGE VERSION:" ${pkged_pv} >> ${LICENSE_MANIFEST} + echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_MANIFEST} + echo "LICENSE: " >> ${LICENSE_MANIFEST} for lic in ${pkged_lic}; do if [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic}" ]; then - echo ${lic}|sed s'/generic_//'g >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest + echo ${lic}|sed s'/generic_//'g >> ${LICENSE_MANIFEST} else - echo "WARNING: The license listed, " ${lic} " was not in the licenses collected for " ${pkged_pn}>> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest + echo "WARNING: The license listed, " ${lic} " was not in the licenses collected for " ${pkged_pn} >> ${LICENSE_MANIFEST} fi done - echo "" >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest + echo "" >> ${LICENSE_MANIFEST} fi fi done @@ -117,7 +118,7 @@ license_create_manifest() { # 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 + cp ${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} |