Preserve modification times on all files when possible.
E.g., for distfiles:
* Preserve modification time when put into your distribution sites;
file modification time in distfiles should be preserved all the way.
If a tar ball is created by some program developor and put on
their distributor's FTP site, then that is moved into Portage's
distfiles, then downloaded to a local disk, that modification time
should be preserved the whole way.
Various methods abound:
* To repair wrong modification times, simply use touch(1) or other
system calls to fix that time (touch --date="..." foo, or send
an empty file and then do touch --reference=exampletimefile foo)
* To preserve in all transit:
+ wget for http files (wget preserves http modification times)
+ lftp for ftp files (lftp preserves ftp modification times)
* I don't quite recommend this third method: encapsulate the file in
an archive that preserves modification time. I do NOT like this
idea for Gentoo! In other distributions which already have this
concept, though, it would make sense.
Since wget and lftp both handle both http and ftp, one or both of them
could be fixed to properly handle both types for modification times.
http is actually easier, since it comes as a string in the header,
so would be a fairly easy patch to lftp.
However, you probably use wget, so that would require an lftp-like
time like patch to wget.
** REASON **
I use date information to know whether a file is recent or not.
If they all have current modification time, then I have to go through
a lot of effort to find out when it was originally released.
Unrelated to the above request, but as an example of its usefulness
in a very ultimate yet limited fasion:
I am one of the rare people that actually gets Linux kernel
distributions on occasion and does a hundred patch applications
with special date fixers to try to get exact file modification
times on all of the files in the thing. You'll often find that
there is a LOT of history in the modification times of those files.
This is very useful when diagnosing problems in the kernel,
while attempting to determine where something came from and when.
(There is a big lag between a lot of kernel parts and their actual
inclusion in the kernel.)
i dunno how feasible this is ...
the fundamental problem is that upstream distributers may not mirror their files with the correct modification times ...
i've seen some packages where upstream even changed the name of the file on different mirrors ;)
the automated script we use for distfile fetching now uses wget, so if wget maintains mtimes, we're already doing this for a majority of our ebuilds.
There are a minority of ebuilds that get uploaded by individual developers via an automated method. We will not be implementing mtime preservation for these ebuilds in the near future.