summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-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}