summaryrefslogtreecommitdiffstats
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass16
1 files changed, 10 insertions, 6 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index da29225983..de6e7fa960 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -827,14 +827,18 @@ sstate_create_package () {
827 fi 827 fi
828 chmod 0664 $TFILE 828 chmod 0664 $TFILE
829 # Skip if it was already created by some other process 829 # Skip if it was already created by some other process
830 if [ ! -e ${SSTATE_PKG} ]; then 830 if [ -h ${SSTATE_PKG} ] && [ ! -e ${SSTATE_PKG} ]; then
831 # There is a symbolic link, but it links to nothing.
832 # Forcefully replace it with the new file.
833 ln -f $TFILE ${SSTATE_PKG} || true
834 elif [ ! -e ${SSTATE_PKG} ]; then
831 # Move into place using ln to attempt an atomic op. 835 # Move into place using ln to attempt an atomic op.
832 # Abort if it already exists 836 # Abort if it already exists
833 ln $TFILE ${SSTATE_PKG} && rm $TFILE 837 ln $TFILE ${SSTATE_PKG} || true
834 else 838 else
835 rm $TFILE 839 touch ${SSTATE_PKG} 2>/dev/null || true
836 fi 840 fi
837 touch ${SSTATE_PKG} 2>/dev/null || true 841 rm $TFILE
838} 842}
839 843
840python sstate_sign_package () { 844python sstate_sign_package () {
@@ -864,7 +868,7 @@ python sstate_report_unihash() {
864sstate_unpack_package () { 868sstate_unpack_package () {
865 tar -xvzf ${SSTATE_PKG} 869 tar -xvzf ${SSTATE_PKG}
866 # update .siginfo atime on local/NFS mirror if it is a symbolic link 870 # update .siginfo atime on local/NFS mirror if it is a symbolic link
867 [ ! -h ${SSTATE_PKG}.siginfo ] || touch -a ${SSTATE_PKG}.siginfo 2>/dev/null || true 871 [ ! -h ${SSTATE_PKG}.siginfo ] || [ ! -e ${SSTATE_PKG}.siginfo ] || touch -a ${SSTATE_PKG}.siginfo 2>/dev/null || true
868 # update each symbolic link instead of any referenced file 872 # update each symbolic link instead of any referenced file
869 touch --no-dereference ${SSTATE_PKG} 2>/dev/null || true 873 touch --no-dereference ${SSTATE_PKG} 2>/dev/null || true
870 [ ! -e ${SSTATE_PKG}.sig ] || touch --no-dereference ${SSTATE_PKG}.sig 2>/dev/null || true 874 [ ! -e ${SSTATE_PKG}.sig ] || touch --no-dereference ${SSTATE_PKG}.sig 2>/dev/null || true
@@ -946,7 +950,7 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True,
946 950
947 localdata2 = bb.data.createCopy(localdata) 951 localdata2 = bb.data.createCopy(localdata)
948 srcuri = "file://" + sstatefile 952 srcuri = "file://" + sstatefile
949 localdata.setVar('SRC_URI', srcuri) 953 localdata2.setVar('SRC_URI', srcuri)
950 bb.debug(2, "SState: Attempting to fetch %s" % srcuri) 954 bb.debug(2, "SState: Attempting to fetch %s" % srcuri)
951 955
952 try: 956 try: