summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2014-09-03 23:12:06 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-29 12:12:44 +0100
commit3ad2f855a79f29deb1b3b26ec99c7624e1b494f6 (patch)
tree062f25249edd8c3497951aff54572875b50a2895 /meta/classes
parent38b8126d15d053e2b9d8d036b630a99fb4c7a7ce (diff)
downloadpoky-3ad2f855a79f29deb1b3b26ec99c7624e1b494f6.tar.gz
sstate.bbclass: update the timestamps after install
Update the sstate file's timestamps after it is installed, it will be very useful for removing the old sstate file, especially, it's not easy to remove when use the shared SSTATE_DIR, we can easily remove them with this change, for example: $ find state-cache -type f -ctime +10 -exec rm -f {} \; Will remove the sstate file which isn't used by recent 10 days. We can use the -atime, but it is not always available, for example, when mounted with "-o noatime". The touch is a very light weight action, and the scripts/sstate-cache-management.sh also requires this. (From OE-Core rev: bbee747466a6947319cff2ffd676abf9432c16ae) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sstate.bbclass2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 72ac882dbb..9160e7f6da 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -624,6 +624,8 @@ sstate_unpack_package () {
624 mkdir -p ${SSTATE_INSTDIR} 624 mkdir -p ${SSTATE_INSTDIR}
625 cd ${SSTATE_INSTDIR} 625 cd ${SSTATE_INSTDIR}
626 tar -xmvzf ${SSTATE_PKG} 626 tar -xmvzf ${SSTATE_PKG}
627 # Use "! -w ||" to return true for read only files
628 [ ! -w ${SSTATE_PKG} ] || touch --no-dereference ${SSTATE_PKG}
627} 629}
628 630
629BB_HASHCHECK_FUNCTION = "sstate_checkhashes" 631BB_HASHCHECK_FUNCTION = "sstate_checkhashes"