<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11307</bug_id>
          
          <creation_ts>2017-04-07 09:18:46 +0000</creation_ts>
          <short_desc>sstate.bbclass tries to modify mirror files</short_desc>
          <delta_ts>2017-04-13 14:28:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>configuration</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paulo Neves">ptsneves</reporter>
          <assigned_to name="Ed Bartosh">eduard.bartosh</assigned_to>
          
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>72172</commentid>
    <comment_count>0</comment_count>
    <who name="Paulo Neves">ptsneves</who>
    <bug_when>2017-04-07 09:18:46 +0000</bug_when>
    <thetext>Commit 51edde653707e7a3cd2186082458f01f32cd1996 makes a wrong assumption that SSTATE_MIRRORS have write permissions.

A mirror is by definition outside of it&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72269</commentid>
    <comment_count>1</comment_count>
      <attachid>3705</attachid>
    <who name="Paulo Neves">ptsneves</who>
    <bug_when>2017-04-11 08:13:04 +0000</bug_when>
    <thetext>Created attachment 3705
Added test for write ability

This patch fixes the bug with minimal impact on the original functionality.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72412</commentid>
    <comment_count>2</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-04-12 21:14:11 +0000</bug_when>
    <thetext>Paulo, thank you for the patch.

Sent it for review: http://lists.openembedded.org/pipermail/openembedded-core/2017-April/135621.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72461</commentid>
    <comment_count>3</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-04-13 14:28:55 +0000</bug_when>
    <thetext>The fix has been merged into master</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>3705</attachid>
            <date>2017-04-11 08:13:04 +0000</date>
            <delta_ts>2017-04-11 08:13:04 +0000</delta_ts>
            <desc>Added test for write ability</desc>
            <filename>0001-Added-test-for-write-ability-of-sstate-mirror-.sigin.patch</filename>
            <type>text/plain</type>
            <size>1102</size>
            <attacher name="Paulo Neves">ptsneves</attacher>
            
              <data encoding="base64">RnJvbSBhYThjYWI5NjYwNzQ0YzhkNTI3N2Y4ZTgyZjEwYTg0NDg4NGFmZjc4IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsbyBOZXZlcyA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