diff options
-rw-r--r-- | meta/classes/sstate.bbclass | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index ee029196da..a0ca199867 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -755,6 +755,11 @@ sstate_task_postfunc[dirs] = "${WORKDIR}" | |||
755 | sstate_create_package () { | 755 | sstate_create_package () { |
756 | TFILE=`mktemp ${SSTATE_PKG}.XXXXXXXX` | 756 | TFILE=`mktemp ${SSTATE_PKG}.XXXXXXXX` |
757 | 757 | ||
758 | # Exit earlu if it already exists | ||
759 | if [ -e ${SSTATE_PKG} ]; then | ||
760 | return | ||
761 | fi | ||
762 | |||
758 | # Use pigz if available | 763 | # Use pigz if available |
759 | OPT="-czS" | 764 | OPT="-czS" |
760 | if [ -x "$(command -v pigz)" ]; then | 765 | if [ -x "$(command -v pigz)" ]; then |
@@ -774,7 +779,12 @@ sstate_create_package () { | |||
774 | tar $OPT --file=$TFILE --files-from=/dev/null | 779 | tar $OPT --file=$TFILE --files-from=/dev/null |
775 | fi | 780 | fi |
776 | chmod 0664 $TFILE | 781 | chmod 0664 $TFILE |
777 | mv -f $TFILE ${SSTATE_PKG} | 782 | # Skip if it was already created by some other process |
783 | if [ ! -e ${SSTATE_PKG} ]; then | ||
784 | mv -f $TFILE ${SSTATE_PKG} | ||
785 | else | ||
786 | rm $TFILE | ||
787 | fi | ||
778 | } | 788 | } |
779 | 789 | ||
780 | python sstate_sign_package () { | 790 | python sstate_sign_package () { |