Patchwork [2/3] license.bbclass: remove deb exlusion

login
register
mail settings
Submitter Elizabeth Flanagan
Date Dec. 10, 2011, 12:05 a.m.
Message ID <20529d73fb789c458d36692761c7da2cfea6c813.1323475141.git.elizabeth.flanagan@intel.com>
Download mbox | patch
Permalink /patch/16625/
State Accepted
Commit 5328587ecaa14a54ad7bced6f7ead218471dbf86
Headers show

Comments

Elizabeth Flanagan - Dec. 10, 2011, 12:05 a.m.
From: Elizabeth Flanagan <elizabeth.flanagan@intel.com>

This commit requires 4a13766c7b223d as it removes the exclusion
of deb package types from license manifest creation.

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
---
 meta/classes/license.bbclass |   49 +++++++++++++++++++----------------------
 1 files changed, 23 insertions(+), 26 deletions(-)

Patch

diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index e520a4c..96fdb46 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -77,34 +77,31 @@  license_create_manifest() {
     list_installed_packages | grep -v "locale" |sort > ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest
     INSTALLED_PKGS=`cat ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest`
     # 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
-            files=`find ${TMPDIR}/pkgdata/*/runtime -name ${pkg}| head -1`
-            for filename in $files; do
-                pkged_pn="$(sed -n 's/^PN: //p' ${filename})"
-                pkged_lic="$(sed -n '/^LICENSE: /{ s/^LICENSE: //; s/[+|&()*]/ /g; s/  */ /g; p }' ${filename})"
-                # check to see if the package name exists in the manifest. if so, bail.
-                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 "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
-                        echo "LICENSE: " >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/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
-                            else
-                                echo "WARNING: The license listed, " ${lic} " was not in the licenses collected for " ${pkged_pn}>> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
-                            fi
-                        done
-                        echo "" >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
-                    fi
+    for pkg in ${INSTALLED_PKGS}; do
+        # not the best way to do this but licenses are not arch dependant iirc
+        files=`find ${TMPDIR}/pkgdata/*/runtime -name ${pkg}| head -1`
+        for filename in $files; do
+            pkged_pn="$(sed -n 's/^PN: //p' ${filename})"
+            pkged_lic="$(sed -n '/^LICENSE: /{ s/^LICENSE: //; s/[+|&()*]/ /g; s/  */ /g; p }' ${filename})"
+            # check to see if the package name exists in the manifest. if so, bail.
+            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 "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
+                    echo "LICENSE: " >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/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
+                        else
+                            echo "WARNING: The license listed, " ${lic} " was not in the licenses collected for " ${pkged_pn}>> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
+                        fi
+                    done
+                    echo "" >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
                 fi
-            done
+            fi
         done
-    fi
+    done
 
     # Two options here:
     # - Just copy the manifest