After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 720363 - Set file mtimes to 0 upon commit
Set file mtimes to 0 upon commit
Status: RESOLVED FIXED
Product: ostree
Classification: Infrastructure
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: OSTree maintainer(s)
OSTree maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-12-12 23:09 UTC by Roddy Shuler
Modified: 2013-12-15 16:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (1.70 KB, patch)
2013-12-12 23:09 UTC, Roddy Shuler
committed Details | Review

Description Roddy Shuler 2013-12-12 23:09:38 UTC
Created attachment 264107 [details] [review]
Proposed patch

As reported by Daniel Drake:
https://mail.gnome.org/archives/ostree-list/2013-December/msg00002.html

The loss of original timestamps hinders some tools such as guile, which use the mtimes to determine whether or not source files are newer than compiled files and need to be recompiled.

In our particular case, this leads to very slow launching of Aisleriot solitaire (sol).

Attached is a proposed patch that sets the mtimes to 0 for all files during commit.  It compiles but is untested.
Comment 1 Christian Persch 2013-12-13 09:49:05 UTC
Why does this slow aisleriot? Only the compiled files are installed, so there shouldn't be any need to check their timestamps. If it does, that looks like a guile bug.
Comment 2 Roddy Shuler 2013-12-13 17:20:21 UTC
Aisleriot installs only the compiled files that describe its games, but these compiled files use libraries that are provided by Guile.  These  Guile libraries are installed as both source and compiled files.  Similar in spirit to having Python libraries as .py source and .pyc compiled.  So, every time Aisleriot lauches, these compiled Guile libraries are detected as being older than the source for those libraries, and they are recompiled.

Setting the mtimes to 0 is per recommendation of Colin Walters... see https://mail.gnome.org/archives/ostree-list/2013-December/msg00001.html.
Comment 3 Colin Walters 2013-12-15 16:33:32 UTC
Review of attachment 264107 [details] [review]:

Looks good, and it does work in testing here.  I've added a test case too.  Thanks!