]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate.bbclass: update .siginfo atime
authorEd Bartosh <ed.bartosh@linux.intel.com>
Mon, 6 Mar 2017 15:31:00 +0000 (17:31 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 10 Mar 2017 10:15:44 +0000 (10:15 +0000)
.siginfo files are not being accessed from local or NFS-mounted
sstate mirrors when sstate package is installed, so their atime
is not updated. If sstate mirror is cleaned based on access time,
they get deleted, even though they are still being used.

Updated atime of .siginfo symlinks with 'touch -a'. This command
dereferences symlinks pointing to the local mirror and updates
atime of the .siginfo file on the mirror.

[YOCTO #10857]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/sstate.bbclass

index 23dda082ca4ca5066d0d8cbab6c65e8dac3b5862..e415f68870e7fdfb1214b2f1c4e72025ce9bb87a 100644 (file)
@@ -747,6 +747,8 @@ python sstate_sign_package () {
 #
 sstate_unpack_package () {
        tar -xvzf ${SSTATE_PKG}
+       # update .siginfo atime on local/NFS mirror
+       [ -h ${SSTATE_PKG}.siginfo ] && touch -a ${SSTATE_PKG}.siginfo
        # Use "! -w ||" to return true for read only files
        [ ! -w ${SSTATE_PKG} ] || touch --no-dereference ${SSTATE_PKG}
        [ ! -w ${SSTATE_PKG}.sig ] || [ ! -e ${SSTATE_PKG}.sig ] || touch --no-dereference ${SSTATE_PKG}.sig