On Mon, 2009-03-30 at 19:14 +0200, Ulrich Mueller wrote: > I'll try to summarise the current state of discussion in > <https://bugs.gentoo.org/264130>. The goal is to satisfy two > (apparently contradictory) requirements: > > a) Some packages need a preserved ordering of file modification > times, therwise things will break at run time (see above). > > b) Files in the installed system should not have mtimes that are > older than the build time of the package. >
> Now, is it possible to satisfy both? I think that the following > procedure would accomplish it: > > 1. Record two timestamps: > before calling pkg_setup, timestamp1; > after src_install has completed, timestamp2. > > 2. After src_install and before merging (the exact time would be > implementation dependent), scan ${D} for files having > mtime < timestamp1 or mtime > timestamp2. > Update their mtimes to timestamp1 or timestamp2, respectively. > > 3. Otherwise (i.e. for files with timestamp1 <= mtime <= timestamp2), > preserve modification times when merging ${D} to ${ROOT}. > > This way, any files generated during the build process (*.pyc, *.fasl, > *.elc) would end up with timestamps newer than their corresponding > source files (*.py, *.lisp, *.el). Please keep this user-situation in mind, which complicates things: When developing local applications outside of portage, they often have autogenerated makefile-dependencies on host-os headerfiles. Now when a host package gets remerged, and the headerfiles don't change, all the local applications recompile everything for nothing... OTOH, when the headerfile changes, it should have mtime updated to 'merge time', because local applications _should_ recompile then. And using 'build time' is of less use with binary packages, it should be 'merge time' instead. Maybe this could be done somehow like this, with 'merge time' calculation for each file based on above steps 1.-3.: * When a to-be-merged file does not exist before, set mtime to 'merge time'. * When a to-be-merged file does exist already, and its content does not change, take the mtime from the already existing file. * When a to-be-merged file does exist already, and its content does change, set mtime to 'merge time'. Maybe this should be done for header files only, or with some black- or whitelisting mechanisms, or for files which have mtime<'build time'? /haubi/ -- Michael Haubenwallner Gentoo on a different level