[oe-commits] [openembedded-core] branch master-next updated: sstate: Improve move into place op

git at git.openembedded.org git at git.openembedded.org
Sat Jan 11 23:52:34 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

The following commit(s) were added to refs/heads/master-next by this push:
     new f92a85c  sstate: Improve move into place op
f92a85c is described below

commit f92a85ccb88a29bdb9e99177f8e800eaab617f75
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Thu Dec 12 22:58:17 2019 +0000

    sstate: Improve move into place op
    
    ln used this way should work more reliably on NFS which is used
    for sstate on the autobuilder.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/sstate.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 356fe7e..fdd5667 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -803,7 +803,9 @@ sstate_create_package () {
 	chmod 0664 $TFILE
 	# Skip if it was already created by some other process
 	if [ ! -e ${SSTATE_PKG} ]; then
-		mv -f $TFILE ${SSTATE_PKG}
+                # Move into place using ln to attempt an atomic op.
+		# Abort if it already exists
+		ln $TFILE ${SSTATE_PKG} && rm $TFILE
 	else
 		rm $TFILE
 	fi

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list