summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorNorman Stetter <norman.stetter@garz-fricke.com>2020-09-25 11:49:43 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-06 13:15:22 (GMT)
commit08fb02b12f27d9840c8cd910052532a065bfd7ed (patch)
tree41a7342f16357e3688aa0c98cffa2b1005b752d1 /meta/classes
parentf2d6fa90b62868f29f7aa0d94b81c0e53f5c06fc (diff)
downloadpoky-08fb02b12f27d9840c8cd910052532a065bfd7ed.tar.gz
sstate.bbclass: Check file ownership before doing 'touch -a'
In contrast to 'touching' a file without parameters 'touch -a' can only be performed by the file owner. In case of a shared sstate-cache served locally (e.g. over NFS), where the user running bitbake is not the owner of sstate-cache files, even if he has write access on group level, the sstate_unpack_package task will fail. Checking if the file is owned by the user before attempting to run 'touch -a' on it solves this. (From OE-Core rev: 8e7bb01564d5b06bcbda402cf4d29d7a0ff170c5) Signed-off-by: Norman Stetter <norman.stetter@garz-fricke.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f1554e8bd40c640fd58daac18ecf7b458e754109) Signed-off-by: Steve Sakoman <steve@sakoman.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, 1 insertions, 1 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 375196e..66a96a7 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -847,7 +847,7 @@ python sstate_report_unihash() {
847sstate_unpack_package () { 847sstate_unpack_package () {
848 tar -xvzf ${SSTATE_PKG} 848 tar -xvzf ${SSTATE_PKG}
849 # update .siginfo atime on local/NFS mirror 849 # update .siginfo atime on local/NFS mirror
850 [ -w ${SSTATE_PKG}.siginfo ] && [ -h ${SSTATE_PKG}.siginfo ] && touch -a ${SSTATE_PKG}.siginfo 850 [ -O ${SSTATE_PKG}.siginfo ] && [ -w ${SSTATE_PKG}.siginfo ] && [ -h ${SSTATE_PKG}.siginfo ] && touch -a ${SSTATE_PKG}.siginfo
851 # Use "! -w ||" to return true for read only files 851 # Use "! -w ||" to return true for read only files
852 [ ! -w ${SSTATE_PKG} ] || touch --no-dereference ${SSTATE_PKG} 852 [ ! -w ${SSTATE_PKG} ] || touch --no-dereference ${SSTATE_PKG}
853 [ ! -w ${SSTATE_PKG}.sig ] || [ ! -e ${SSTATE_PKG}.sig ] || touch --no-dereference ${SSTATE_PKG}.sig 853 [ ! -w ${SSTATE_PKG}.sig ] || [ ! -e ${SSTATE_PKG}.sig ] || touch --no-dereference ${SSTATE_PKG}.sig