Re: File timestamps lost during commit/deploy



On Wed, Dec 4, 2013 at 2:07 PM, Colin Walters <walters verbum org> wrote:
Ah.  So another similar case is Python, which will even try to write
updated files (but silently fail because /usr is read-only).  In the
case of Python though it doesn't really matter as the language is pretty
slow anyways =) and the bytecode compiler is super basic and quite fast
to execute.

BTW, with the "mtime 0" thing there is a possible better solution for
Python, I note you already took care of pyc/pyo files by simply
deleting them to avoid churn due to timestamp updates. Not ideal for
the reasons you explained, also if you *want* to ship pyc/pyo files
with no corresponding source file.

Probably of little interest, but anyway, at ostree build time:

1. Set all mtimes to 0
2. Compile all python bytecode
3. Set all mtimes to 0 again

Now the generated python bytecode doesn't change over rebuilds, as
well as meeting our fixed mtime scheme.

Daniel


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]