<?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>8996</bug_id>
          
          <creation_ts>2016-01-25 14:12:08 +0000</creation_ts>
          <short_desc>When using the sstate, the mtime time of the files stored doesn&apos;t seem to be preserved.</short_desc>
          <delta_ts>2016-05-09 14:26:52 +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>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</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.1 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Igor Stoppa">igor.stoppa</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>bogdanx.a.voiculescu</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          <qa_contact name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>58182</commentid>
    <comment_count>0</comment_count>
    <who name="Igor Stoppa">igor.stoppa</who>
    <bug_when>2016-01-25 14:12:08 +0000</bug_when>
    <thetext>Given a recipe that generates files and stores them in the sstate,
it seems that in successive builds, the timestamp of the file fished from the sstate is assigned based on when the build was executed, rather than the time at which the files were originally built and pickled.


Easy way to reproduce it:

after building an image that generates intel-microcode, from the build directory:


ls -la ./tmp-glibc/deploy/images/intel-corei7-64/microcode_*.cpio

-rwxr-xr-x 2 igor users     693248 Jan 22 15:03 microcode_20151106.cpio


then &quot;bitbake -c clean intel-microcode&quot; and &quot;bitbake intel-microcode&quot;

ls -la ./tmp-glibc/deploy/images/intel-corei7-64/microcode_*.cpio

-rwxr-xr-x 2 igor users 693248 Jan 25 15:46 microcode_20151106.cpio


This can cause problems with sw that relies also on the timestamp for fingerprinting a file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58185</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-01-25 14:35:32 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/meta/classes/sstate.bbclass?id=2d89cff42af2bb0049224bfaaebaa2b21966169f is where this was introduced.

$ ls -la tmp/deploy/images/qemux86/bzImage* -la
lrwxrwxrwx 1 richard richard      75 Jan 25 14:06 tmp/deploy/images/qemux86/bzImage -&gt; bzImage--4.1.15+git0+46bb64d605_788dfc9859-r0.32-qemux86-20160125140441.bin
-rw-r--r-- 2 richard richard 6976432 Jan 12 12:43 tmp/deploy/images/qemux86/bzImage--4.1.15+git0+46bb64d605_788dfc9859-r0.12-qemux86-20160112123145.bin
-rw-r--r-- 2 richard richard 6976432 Jan 15 12:55 tmp/deploy/images/qemux86/bzImage--4.1.15+git0+46bb64d605_788dfc9859-r0.15-qemux86-20160115124134.bin
-rw-r--r-- 2 richard richard 6976432 Jan 15 16:02 tmp/deploy/images/qemux86/bzImage--4.1.15+git0+46bb64d605_788dfc9859-r0.18-qemux86-20160115155708.bin

$ rm tmp/stamps/qemux86-poky-linux/linux-yocto/4.1.15+gitAUTOINC+46bb64d605_788dfc9859-r0.do_deploy.*
$ rm -la tmp/deploy/images/qemux86/bzImage* 
$ bitbake virtual/kernel -c deploy

$ ls -la tmp/deploy/images/qemux86/bzImage* -la
lrwxrwxrwx 1 richard richard      75 Jan 25 14:23 tmp/deploy/images/qemux86/bzImage -&gt; bzImage--4.1.15+git0+46bb64d605_788dfc9859-r0.32-qemux86-20160125140441.bin
-rw-r--r-- 2 richard richard 6976432 Jan 25 14:23 tmp/deploy/images/qemux86/bzImage--4.1.15+git0+46bb64d605_788dfc9859-r0.12-qemux86-20160112123145.bin
-rw-r--r-- 2 richard richard 6976432 Jan 25 14:23 tmp/deploy/images/qemux86/bzImage--4.1.15+git0+46bb64d605_788dfc9859-r0.15-qemux86-20160115124134.bin
-rw-r--r-- 2 richard richard 6976432 Jan 25 14:23 tmp/deploy/images/qemux86/bzImage--4.1.15+git0+46bb64d605_788dfc9859-r0.18-qemux86-20160115155708.bin

where as once the above patch is reverted, the timestamps are preserved as expected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58384</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-02-01 11:24:31 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=5503a22ad07562c98db90d26b376f1d0e6689e71</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61933</commentid>
    <comment_count>3</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2016-05-04 13:38:56 +0000</bug_when>
    <thetext>Verified on master f7b520878babbaa7527151f22c031ae160512753 using RP&apos;s steps.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>