Patchwork [22/22] license.bbclass: Avoid grep error message

login
register
mail settings
Submitter Mark Hatle
Date Dec. 4, 2012, 5:14 p.m.
Message ID <0c69e555dda2fa412ba12fa90886b0b92dc60e44.1354641032.git.mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/40321/
State Accepted
Commit dde5e6402ad8284d55effc032cfbe1bb21867778
Headers show

Comments

Mark Hatle - Dec. 4, 2012, 5:14 p.m.
Touch a file that is later greped to make sure it exists.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/classes/license.bbclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index c7ca4a6..66cde1c 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -13,7 +13,7 @@  do_populate_lic[cleandirs] = "${LICSSTATEDIR}"
 license_create_manifest() {
 	mkdir -p ${LICENSE_DIRECTORY}/${IMAGE_NAME}
 	# Get list of installed packages
-	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`
 	LICENSE_MANIFEST="${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest"
 	# remove existing license.manifest file
@@ -21,6 +21,7 @@  license_create_manifest() {
 		rm ${LICENSE_MANIFEST}
 	fi
 	# list of installed packages is broken for deb
+	touch ${LICENSE_MANIFEST}
 	for pkg in ${INSTALLED_PKGS}; do
 		# not the best way to do this but licenses are not arch dependant iirc
 		filename=`ls ${TMPDIR}/pkgdata/*/runtime-reverse/${pkg}| head -1`