diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-09-12 16:39:16 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-09-16 22:13:51 +0100 |
commit | 57edf5991a80c3714e21408f92d9b9218a54d0ff (patch) | |
tree | 58a2ef7115dc3798acaa750b1cc8ab027dadcb3d /meta/classes | |
parent | 70290325e4654a084ed970c247618fbdf2f99984 (diff) | |
download | poky-57edf5991a80c3714e21408f92d9b9218a54d0ff.tar.gz |
sstate: Fix incorrect return value handling
The use of [ and && here means $? is reset and the exit 1 error
interception wasn't working, leading to "file changed as we read it"
errors from sstate_create_package when heavily using hardlinks.
Fix this by placing $? into a variable.
(From OE-Core rev: 6e51f900b76b06c09a3d6927f8db7398e2c035ed)
(From OE-Core rev: 75040a098e11927e6872e3a2a6286fe3ed0c7f47)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/sstate.bbclass | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 67e0c1d13a..2d8db57c81 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -599,7 +599,8 @@ sstate_create_package () { | |||
599 | if [ "$(ls -A)" ]; then | 599 | if [ "$(ls -A)" ]; then |
600 | set +e | 600 | set +e |
601 | tar -czf $TFILE * | 601 | tar -czf $TFILE * |
602 | if [ $? -ne 0 ] && [ $? -ne 1 ]; then | 602 | ret=$? |
603 | if [ $ret -ne 0 ] && [ $ret -ne 1 ]; then | ||
603 | exit 1 | 604 | exit 1 |
604 | fi | 605 | fi |
605 | set -e | 606 | set -e |