]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
sstate: Update unpack touch code to be consistent
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Jul 2026 10:55:47 +0000 (11:55 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Jul 2026 17:01:07 +0000 (18:01 +0100)
When we unpack sstate files, we want to update the mtime+atime of the sstate
object and any sig/siginfo files, both for the files themselves and symlinks.

The logic was getting a bit hard to follow and wasn't entirely consistent with
only a time in some cases.

Clean it up and be consistent for all the files.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-global/sstate.bbclass

index 9037d209270fb08288461ca75e3fe1f6271e8726..6ee83717bba7bfb5e4641b8790a1da14b8b6e4db 100644 (file)
@@ -932,12 +932,13 @@ sstate_unpack_package () {
        fi
 
        tar -I "$ZSTD" -xvpf ${SSTATE_PKG}
-       # update .siginfo atime on local/NFS mirror if it is a symbolic link
-       [ ! -h ${SSTATE_PKG}.siginfo ] || [ ! -e ${SSTATE_PKG}.siginfo ] || touch -a ${SSTATE_PKG}.siginfo 2>/dev/null || true
-       # update each symbolic link instead of any referenced file
-       touch --no-dereference ${SSTATE_PKG} 2>/dev/null || true
-       [ ! -e ${SSTATE_PKG}.sig ] || touch --no-dereference ${SSTATE_PKG}.sig 2>/dev/null || true
-       [ ! -e ${SSTATE_PKG}.siginfo ] || touch --no-dereference ${SSTATE_PKG}.siginfo 2>/dev/null || true
+
+       # Update both any file and any symlink pointing to the file for sigs as well as the file
+       for file in ${SSTATE_PKG} ${SSTATE_PKG}.sig ${SSTATE_PKG}.siginfo
+       do
+               [ ! -e $file ] || touch $file 2>/dev/null || true
+               [ ! -e $file ] || touch --no-dereference $file 2>/dev/null || true
+       done
 }
 
 BB_HASHCHECK_FUNCTION = "sstate_checkhashes"