summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/license.bbclass40
1 files changed, 23 insertions, 17 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 021ab2ee17..8fb66be502 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -90,26 +90,32 @@ license_create_manifest() {
90 # not the best way to do this but licenses are not arch dependant iirc 90 # not the best way to do this but licenses are not arch dependant iirc
91 filename=`ls ${TMPDIR}/pkgdata/*/runtime-reverse/${pkg}| head -1` 91 filename=`ls ${TMPDIR}/pkgdata/*/runtime-reverse/${pkg}| head -1`
92 pkged_pn="$(sed -n 's/^PN: //p' ${filename})" 92 pkged_pn="$(sed -n 's/^PN: //p' ${filename})"
93
94 # exclude locale recipes
95 if [ "${pkged_pn}" = "*locale*" ]; then
96 continue
97 fi
98
99 # check to see if the package name exists in the manifest. if so, bail.
100 if grep -q "^PACKAGE NAME: ${pkg}" ${LICENSE_MANIFEST}; then
101 continue
102 fi
103
93 pkged_lic="$(sed -n '/^LICENSE: /{ s/^LICENSE: //; s/[+|&()*]/ /g; s/ */ /g; p }' ${filename})" 104 pkged_lic="$(sed -n '/^LICENSE: /{ s/^LICENSE: //; s/[+|&()*]/ /g; s/ */ /g; p }' ${filename})"
94 pkged_pv="$(sed -n 's/^PV: //p' ${filename})" 105 pkged_pv="$(sed -n 's/^PV: //p' ${filename})"
95 # check to see if the package name exists in the manifest. if so, bail. 106
96 if ! grep -q "^PACKAGE NAME: ${pkg}" ${LICENSE_MANIFEST}; then 107 echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_MANIFEST}
97 # exclude local recipes 108 echo "PACKAGE VERSION:" ${pkged_pv} >> ${LICENSE_MANIFEST}
98 if [ ! "${pkged_pn}" = "*locale*" ]; then 109 echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_MANIFEST}
99 echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_MANIFEST} 110 echo "LICENSE: " >> ${LICENSE_MANIFEST}
100 echo "PACKAGE VERSION:" ${pkged_pv} >> ${LICENSE_MANIFEST} 111 for lic in ${pkged_lic}; do
101 echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_MANIFEST} 112 if [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic}" ]; then
102 echo "LICENSE: " >> ${LICENSE_MANIFEST} 113 echo ${lic}|sed s'/generic_//'g >> ${LICENSE_MANIFEST}
103 for lic in ${pkged_lic}; do 114 else
104 if [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic}" ]; then 115 echo "WARNING: The license listed, " ${lic} " was not in the licenses collected for " ${pkged_pn} >> ${LICENSE_MANIFEST}
105 echo ${lic}|sed s'/generic_//'g >> ${LICENSE_MANIFEST}
106 else
107 echo "WARNING: The license listed, " ${lic} " was not in the licenses collected for " ${pkged_pn} >> ${LICENSE_MANIFEST}
108 fi
109 done
110 echo "" >> ${LICENSE_MANIFEST}
111 fi 116 fi
112 fi 117 done
118 echo "" >> ${LICENSE_MANIFEST}
113 done 119 done
114 120
115 # Two options here: 121 # Two options here: