mirror of
https://git.yoctoproject.org/poky
synced 2026-04-20 09:32:13 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
38b8126d15
commit
3ad2f855a7
@@ -624,6 +624,8 @@ sstate_unpack_package () {
|
||||
mkdir -p ${SSTATE_INSTDIR}
|
||||
cd ${SSTATE_INSTDIR}
|
||||
tar -xmvzf ${SSTATE_PKG}
|
||||
# Use "! -w ||" to return true for read only files
|
||||
[ ! -w ${SSTATE_PKG} ] || touch --no-dereference ${SSTATE_PKG}
|
||||
}
|
||||
|
||||
BB_HASHCHECK_FUNCTION = "sstate_checkhashes"
|
||||
|
||||
Reference in New Issue
Block a user