Patchwork [6/6] classes/license: place all found licenses on one line

login
register
mail settings
Submitter Vladimir Zapolskiy
Date Sept. 11, 2012, 1:18 a.m.
Message ID <1347326296-32657-3-git-send-email-vladimir_zapolskiy@mentor.com>
Download mbox | patch
Permalink /patch/36241/
State New
Headers show

Comments

Vladimir Zapolskiy - Sept. 11, 2012, 1:18 a.m.
Cosmetic change, settle all found licenses into one line and report warning
about missing licenses loudly.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
---
 meta/classes/license.bbclass |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 4b5954d..82f4d9a 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -112,16 +112,16 @@  license_create_manifest() {
 		echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_MANIFEST}
 		echo "PACKAGE VERSION:" ${pkged_pv} >> ${LICENSE_MANIFEST}
 		echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_MANIFEST}
-		echo "LICENSE: " >> ${LICENSE_MANIFEST}
+		echo -n "LICENSE:" >> ${LICENSE_MANIFEST}
 		for lic in ${pkged_lic}; do
 			# to reference a license file trim trailing + symbol
 			if [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic%+}" ]; then
-				echo ${lic} >> ${LICENSE_MANIFEST}
+				echo -n " ${lic}" >> ${LICENSE_MANIFEST}
 			else
-				echo "WARNING: The license listed, " ${lic} " was not in the licenses collected for " ${pkged_pn} >> ${LICENSE_MANIFEST}
+				echo "WARNING: The license listed ${lic} was not in the licenses collected for ${pkged_pn}"
 			fi
 		done
-		echo "" >> ${LICENSE_MANIFEST}
+		echo "\n" >> ${LICENSE_MANIFEST}
 	done
 
 	# Two options here: