diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-26 11:36:24 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-26 12:02:30 +0000 |
commit | 4c55d2bd0460516bef3546f9b98273049affdd1d (patch) | |
tree | a8f7f25f9bbe172aab8241b7417749f862b732ee /meta | |
parent | 82745e4f32e83a49e2fbb825ace8d3452c37b4d4 (diff) | |
download | poky-4c55d2bd0460516bef3546f9b98273049affdd1d.tar.gz |
sstate.bbclass: Correctly handle empty sstate packages
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/sstate.bbclass | 7 |
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 () { | |||
382 | # | 382 | # |
383 | sstate_create_package () { | 383 | sstate_create_package () { |
384 | cd ${SSTATE_BUILDDIR} | 384 | cd ${SSTATE_BUILDDIR} |
385 | tar -cvzf ${SSTATE_PKG} * | 385 | # Need to handle empty directories |
386 | if [ "$(ls -A)" ]; then | ||
387 | tar -cvzf ${SSTATE_PKG} * | ||
388 | else | ||
389 | tar -cvz --file=${SSTATE_PKG} --files-from=/dev/null | ||
390 | fi | ||
386 | 391 | ||
387 | cd ${WORKDIR} | 392 | cd ${WORKDIR} |
388 | rm -rf ${SSTATE_BUILDDIR} | 393 | rm -rf ${SSTATE_BUILDDIR} |