mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 12:49:34 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
50195e4af1
commit
45f6a21065
@@ -77,34 +77,31 @@ license_create_manifest() {
|
|||||||
list_installed_packages | grep -v "locale" |sort > ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest
|
list_installed_packages | grep -v "locale" |sort > ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest
|
||||||
INSTALLED_PKGS=`cat ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest`
|
INSTALLED_PKGS=`cat ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest`
|
||||||
# list of installed packages is broken for deb
|
# list of installed packages is broken for deb
|
||||||
if [ ${IMAGE_PKGTYPE} != "deb" ]; then
|
for pkg in ${INSTALLED_PKGS}; do
|
||||||
|
# not the best way to do this but licenses are not arch dependant iirc
|
||||||
for pkg in ${INSTALLED_PKGS}; do
|
files=`find ${TMPDIR}/pkgdata/*/runtime -name ${pkg}| head -1`
|
||||||
# not the best way to do this but licenses are not arch dependant iirc
|
for filename in $files; do
|
||||||
files=`find ${TMPDIR}/pkgdata/*/runtime -name ${pkg}| head -1`
|
pkged_pn="$(sed -n 's/^PN: //p' ${filename})"
|
||||||
for filename in $files; do
|
pkged_lic="$(sed -n '/^LICENSE: /{ s/^LICENSE: //; s/[+|&()*]/ /g; s/ */ /g; p }' ${filename})"
|
||||||
pkged_pn="$(sed -n 's/^PN: //p' ${filename})"
|
# check to see if the package name exists in the manifest. if so, bail.
|
||||||
pkged_lic="$(sed -n '/^LICENSE: /{ s/^LICENSE: //; s/[+|&()*]/ /g; s/ */ /g; p }' ${filename})"
|
if ! grep -q "PACKAGE NAME: ${pkg}" ${filename}; then
|
||||||
# check to see if the package name exists in the manifest. if so, bail.
|
# exclude local recipes
|
||||||
if ! grep -q "PACKAGE NAME: ${pkg}" ${filename}; then
|
if [ ! "${pkged_pn}" = "*locale*" ]; then
|
||||||
# exclude local recipes
|
echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
|
||||||
if [ ! "${pkged_pn}" = "*locale*" ]; then
|
echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
|
||||||
echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
|
echo "LICENSE: " >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
|
||||||
echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
|
for lic in ${pkged_lic}; do
|
||||||
echo "LICENSE: " >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
|
if [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic}" ]; then
|
||||||
for lic in ${pkged_lic}; do
|
echo ${lic}|sed s'/generic_//'g >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
|
||||||
if [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic}" ]; then
|
else
|
||||||
echo ${lic}|sed s'/generic_//'g >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
|
echo "WARNING: The license listed, " ${lic} " was not in the licenses collected for " ${pkged_pn}>> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
|
||||||
else
|
fi
|
||||||
echo "WARNING: The license listed, " ${lic} " was not in the licenses collected for " ${pkged_pn}>> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
|
done
|
||||||
fi
|
echo "" >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
|
||||||
done
|
|
||||||
echo "" >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
fi
|
||||||
done
|
done
|
||||||
fi
|
done
|
||||||
|
|
||||||
# Two options here:
|
# Two options here:
|
||||||
# - Just copy the manifest
|
# - Just copy the manifest
|
||||||
|
|||||||
Reference in New Issue
Block a user