summaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
authorElizabeth Flanagan <elizabeth.flanagan@intel.com>2011-12-09 16:05:23 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-10 00:18:15 +0000
commit45f6a2106596ffe0ceb54930a61ffeb304ab6702 (patch)
tree58129791e3b0b0fc9049311f2ce048847f846a1d /meta/classes/license.bbclass
parent50195e4af1ed0e64346409ee37f1ad7b3118a7c1 (diff)
downloadpoky-45f6a2106596ffe0ceb54930a61ffeb304ab6702.tar.gz
license.bbclass: remove deb exclusion
This commit requires 4a13766c7b223d as it removes the exclusion of deb package types from license manifest creation. (From OE-Core rev: 5328587ecaa14a54ad7bced6f7ead218471dbf86) Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r--meta/classes/license.bbclass49
1 files changed, 23 insertions, 26 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index e520a4ceeb..96fdb46155 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -77,34 +77,31 @@ license_create_manifest() {
77 list_installed_packages | grep -v "locale" |sort > ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest 77 list_installed_packages | grep -v "locale" |sort > ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest
78 INSTALLED_PKGS=`cat ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest` 78 INSTALLED_PKGS=`cat ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest`
79 # list of installed packages is broken for deb 79 # list of installed packages is broken for deb
80 if [ ${IMAGE_PKGTYPE} != "deb" ]; then 80 for pkg in ${INSTALLED_PKGS}; do
81 81 # not the best way to do this but licenses are not arch dependant iirc
82 for pkg in ${INSTALLED_PKGS}; do 82 files=`find ${TMPDIR}/pkgdata/*/runtime -name ${pkg}| head -1`
83 # not the best way to do this but licenses are not arch dependant iirc 83 for filename in $files; do
84 files=`find ${TMPDIR}/pkgdata/*/runtime -name ${pkg}| head -1` 84 pkged_pn="$(sed -n 's/^PN: //p' ${filename})"
85 for filename in $files; do 85 pkged_lic="$(sed -n '/^LICENSE: /{ s/^LICENSE: //; s/[+|&()*]/ /g; s/ */ /g; p }' ${filename})"
86 pkged_pn="$(sed -n 's/^PN: //p' ${filename})" 86 # check to see if the package name exists in the manifest. if so, bail.
87 pkged_lic="$(sed -n '/^LICENSE: /{ s/^LICENSE: //; s/[+|&()*]/ /g; s/ */ /g; p }' ${filename})" 87 if ! grep -q "PACKAGE NAME: ${pkg}" ${filename}; then
88 # check to see if the package name exists in the manifest. if so, bail. 88 # exclude local recipes
89 if ! grep -q "PACKAGE NAME: ${pkg}" ${filename}; then 89 if [ ! "${pkged_pn}" = "*locale*" ]; then
90 # exclude local recipes 90 echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
91 if [ ! "${pkged_pn}" = "*locale*" ]; then 91 echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
92 echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest 92 echo "LICENSE: " >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
93 echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest 93 for lic in ${pkged_lic}; do
94 echo "LICENSE: " >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest 94 if [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic}" ]; then
95 for lic in ${pkged_lic}; do 95 echo ${lic}|sed s'/generic_//'g >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
96 if [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic}" ]; then 96 else
97 echo ${lic}|sed s'/generic_//'g >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest 97 echo "WARNING: The license listed, " ${lic} " was not in the licenses collected for " ${pkged_pn}>> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
98 else 98 fi
99 echo "WARNING: The license listed, " ${lic} " was not in the licenses collected for " ${pkged_pn}>> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest 99 done
100 fi 100 echo "" >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
101 done
102 echo "" >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
103 fi
104 fi 101 fi
105 done 102 fi
106 done 103 done
107 fi 104 done
108 105
109 # Two options here: 106 # Two options here:
110 # - Just copy the manifest 107 # - Just copy the manifest