diff options
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r-- | meta/classes/sstate.bbclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 356fe7ec18..b4ffffcd98 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -776,6 +776,7 @@ sstate_task_postfunc[dirs] = "${WORKDIR}" | |||
776 | sstate_create_package () { | 776 | sstate_create_package () { |
777 | # Exit early if it already exists | 777 | # Exit early if it already exists |
778 | if [ -e ${SSTATE_PKG} ]; then | 778 | if [ -e ${SSTATE_PKG} ]; then |
779 | touch ${SSTATE_PKG} | ||
779 | return | 780 | return |
780 | fi | 781 | fi |
781 | 782 | ||
@@ -803,10 +804,13 @@ sstate_create_package () { | |||
803 | chmod 0664 $TFILE | 804 | chmod 0664 $TFILE |
804 | # Skip if it was already created by some other process | 805 | # Skip if it was already created by some other process |
805 | if [ ! -e ${SSTATE_PKG} ]; then | 806 | if [ ! -e ${SSTATE_PKG} ]; then |
806 | mv -f $TFILE ${SSTATE_PKG} | 807 | # Move into place using ln to attempt an atomic op. |
808 | # Abort if it already exists | ||
809 | ln $TFILE ${SSTATE_PKG} && rm $TFILE | ||
807 | else | 810 | else |
808 | rm $TFILE | 811 | rm $TFILE |
809 | fi | 812 | fi |
813 | touch ${SSTATE_PKG} | ||
810 | } | 814 | } |
811 | 815 | ||
812 | python sstate_sign_package () { | 816 | python sstate_sign_package () { |