From 4c55d2bd0460516bef3546f9b98273049affdd1d Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 26 Jan 2011 11:36:24 +0000 Subject: sstate.bbclass: Correctly handle empty sstate packages Signed-off-by: Richard Purdie --- meta/classes/sstate.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'meta/classes/sstate.bbclass') diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index c2dc22e0a..3bfb554aa 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass @@ -382,7 +382,12 @@ python sstate_task_postfunc () { # sstate_create_package () { cd ${SSTATE_BUILDDIR} - tar -cvzf ${SSTATE_PKG} * + # Need to handle empty directories + if [ "$(ls -A)" ]; then + tar -cvzf ${SSTATE_PKG} * + else + tar -cvz --file=${SSTATE_PKG} --files-from=/dev/null + fi cd ${WORKDIR} rm -rf ${SSTATE_BUILDDIR} -- cgit v1.2.3