GNOME Bugzilla – Bug 720363
Set file mtimes to 0 upon commit
Last modified: 2013-12-15 16:33:51 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.
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.
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.
Review of attachment 264107 [details] [review]: Looks good, and it does work in testing here. I've added a test case too. Thanks!