summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-26 11:36:24 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-26 12:02:30 +0000
commit4c55d2bd0460516bef3546f9b98273049affdd1d (patch)
treea8f7f25f9bbe172aab8241b7417749f862b732ee /meta/classes
parent82745e4f32e83a49e2fbb825ace8d3452c37b4d4 (diff)
downloadopenembedded-core-4c55d2bd0460516bef3546f9b98273049affdd1d.tar.gz
openembedded-core-4c55d2bd0460516bef3546f9b98273049affdd1d.tar.bz2
openembedded-core-4c55d2bd0460516bef3546f9b98273049affdd1d.zip
sstate.bbclass: Correctly handle empty sstate packages
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sstate.bbclass7
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index c2dc22e0ac..3bfb554aa5 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}