summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-04-13 00:00:18 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-13 07:32:48 +0100
commit112ae104287ad4078a9fa90fb2a42f4c814ef824 (patch)
treea48d8d076b384c768345d3150c40300c54dd2ed2 /meta/classes
parentcbb5961d3db27f81967345a73267920f2623ccac (diff)
downloadopenembedded-core-112ae104287ad4078a9fa90fb2a42f4c814ef824.tar.gz
openembedded-core-112ae104287ad4078a9fa90fb2a42f4c814ef824.tar.bz2
openembedded-core-112ae104287ad4078a9fa90fb2a42f4c814ef824.zip
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] Signed-off-by: Ed Bartosh <ed.bartosh@linux.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, 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 () {
sstate_unpack_package () {
tar -xvzf ${SSTATE_PKG}
# update .siginfo atime on local/NFS mirror
- [ -h ${SSTATE_PKG}.siginfo ] && touch -a ${SSTATE_PKG}.siginfo
+ [ -w ${SSTATE_PKG}.siginfo ] && [ -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