Bug 11307

Summary: sstate.bbclass tries to modify mirror files
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paulo Neves <ptsneves>
Component: configurationAssignee: Ed Bartosh <eduard.bartosh>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+    
Version: unspecified   
Target Milestone: 2.3 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Added test for write ability none

Description Paulo Neves 2017-04-07 09:18:46 UTC
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.

If we had the possibility to modify the sstate-mirror we would have set SSTATE_DIR instead. There are 3 possible fixes:

* Revert this patch. It seems tailored to a very special use case which breaks the definition of mirror.
* Only touch the file if the file access time is writeable.
* Set (yet) another option to touch SSTATE_MIRROR files.

I also can imagine this raising sever performance issues if the mirror is used by several users at the same time. The server will need to update the file meta data every time

I can provide the patch for one of the 3 options above.

Related to (https://bugzilla.yoctoproject.org/show_bug.cgi?id=10857)

Best regards
Paulo Neves
Comment 1 Paulo Neves 2017-04-11 08:13:04 UTC
Created attachment 3705 [details]
Added test for write ability

This patch fixes the bug with minimal impact on the original functionality.
Comment 2 Ed Bartosh 2017-04-12 21:14:11 UTC
Paulo, thank you for the patch.

Sent it for review: http://lists.openembedded.org/pipermail/openembedded-core/2017-April/135621.html
Comment 3 Ed Bartosh 2017-04-13 14:28:55 UTC
The fix has been merged into master