diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2017-04-13 00:00:18 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-13 07:33:08 +0100 |
commit | 47fc2d6139dbe34fcd752b3e91de59c25a9aa03d (patch) | |
tree | 84f340c5bc4d8fb65962bd83a0540bff306b8f64 /meta | |
parent | 8a96509017580f02b3cd9d27d03f6e061ea4175d (diff) | |
download | poky-47fc2d6139dbe34fcd752b3e91de59c25a9aa03d.tar.gz |
sstate.bbclass: check if mirror directory is writable
Commit 51edde653707e7a3cd2186082458f01f32cd1996 makes a wrong assumption
that SSTATE_MIRRORS have write permissions.
A mirror is by definition outside of it's user control. In my use case
it happens I does not have permissions to update the access time of the
dereferenced symbolic-link file.
Checked if file is writable before changing its atime.
Thanks to Paulo Neves for the patch.
[YOCTO #11307]
(From OE-Core rev: 112ae104287ad4078a9fa90fb2a42f4c814ef824)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/sstate.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 4fdfcc83ec..e2bc7355b4 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -725,7 +725,7 @@ python sstate_sign_package () { | |||
725 | sstate_unpack_package () { | 725 | sstate_unpack_package () { |
726 | tar -xvzf ${SSTATE_PKG} | 726 | tar -xvzf ${SSTATE_PKG} |
727 | # update .siginfo atime on local/NFS mirror | 727 | # update .siginfo atime on local/NFS mirror |
728 | [ -h ${SSTATE_PKG}.siginfo ] && touch -a ${SSTATE_PKG}.siginfo | 728 | [ -w ${SSTATE_PKG}.siginfo ] && [ -h ${SSTATE_PKG}.siginfo ] && touch -a ${SSTATE_PKG}.siginfo |
729 | # Use "! -w ||" to return true for read only files | 729 | # Use "! -w ||" to return true for read only files |
730 | [ ! -w ${SSTATE_PKG} ] || touch --no-dereference ${SSTATE_PKG} | 730 | [ ! -w ${SSTATE_PKG} ] || touch --no-dereference ${SSTATE_PKG} |
731 | [ ! -w ${SSTATE_PKG}.sig ] || [ ! -e ${SSTATE_PKG}.sig ] || touch --no-dereference ${SSTATE_PKG}.sig | 731 | [ ! -w ${SSTATE_PKG}.sig ] || [ ! -e ${SSTATE_PKG}.sig ] || touch --no-dereference ${SSTATE_PKG}.sig |