summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/license.bbclass21
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() {
80 # Get list of installed packages 80 # Get list of installed packages
81 list_installed_packages | grep -v "locale" |sort > ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest 81 list_installed_packages | grep -v "locale" |sort > ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest
82 INSTALLED_PKGS=`cat ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest` 82 INSTALLED_PKGS=`cat ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest`
83 LICENSE_MANIFEST="${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest"
83 # remove existing license.manifest file 84 # remove existing license.manifest file
84 if [ -f ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest ]; then 85 if [ -f ${LICENSE_MANIFEST} ]; then
85 rm ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest 86 rm ${LICENSE_MANIFEST}
86 fi 87 fi
87 # list of installed packages is broken for deb 88 # list of installed packages is broken for deb
88 for pkg in ${INSTALLED_PKGS}; do 89 for pkg in ${INSTALLED_PKGS}; do
@@ -95,18 +96,18 @@ license_create_manifest() {
95 if ! grep -q "PACKAGE NAME: ${pkg}" ${filename}; then 96 if ! grep -q "PACKAGE NAME: ${pkg}" ${filename}; then
96 # exclude local recipes 97 # exclude local recipes
97 if [ ! "${pkged_pn}" = "*locale*" ]; then 98 if [ ! "${pkged_pn}" = "*locale*" ]; then
98 echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest 99 echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_MANIFEST}
99 echo "PACKAGE VERSION:" ${pkged_pv} >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest 100 echo "PACKAGE VERSION:" ${pkged_pv} >> ${LICENSE_MANIFEST}
100 echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest 101 echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_MANIFEST}
101 echo "LICENSE: " >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest 102 echo "LICENSE: " >> ${LICENSE_MANIFEST}
102 for lic in ${pkged_lic}; do 103 for lic in ${pkged_lic}; do
103 if [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic}" ]; then 104 if [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic}" ]; then
104 echo ${lic}|sed s'/generic_//'g >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest 105 echo ${lic}|sed s'/generic_//'g >> ${LICENSE_MANIFEST}
105 else 106 else
106 echo "WARNING: The license listed, " ${lic} " was not in the licenses collected for " ${pkged_pn}>> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest 107 echo "WARNING: The license listed, " ${lic} " was not in the licenses collected for " ${pkged_pn} >> ${LICENSE_MANIFEST}
107 fi 108 fi
108 done 109 done
109 echo "" >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest 110 echo "" >> ${LICENSE_MANIFEST}
110 fi 111 fi
111 fi 112 fi
112 done 113 done
@@ -117,7 +118,7 @@ license_create_manifest() {
117 # With both options set we see a .5 M increase in core-image-minimal 118 # With both options set we see a .5 M increase in core-image-minimal
118 if [ -n "${COPY_LIC_MANIFEST}" ]; then 119 if [ -n "${COPY_LIC_MANIFEST}" ]; then
119 mkdir -p ${IMAGE_ROOTFS}/usr/share/common-licenses/ 120 mkdir -p ${IMAGE_ROOTFS}/usr/share/common-licenses/
120 cp ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest ${IMAGE_ROOTFS}/usr/share/common-licenses/license.manifest 121 cp ${LICENSE_MANIFEST} ${IMAGE_ROOTFS}/usr/share/common-licenses/license.manifest
121 if [ -n "${COPY_LIC_DIRS}" ]; then 122 if [ -n "${COPY_LIC_DIRS}" ]; then
122 for pkg in ${INSTALLED_PKGS}; do 123 for pkg in ${INSTALLED_PKGS}; do
123 mkdir -p ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg} 124 mkdir -p ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}