Gentoo Logo
Gentoo Spaceship

Installation:
Gentoo Handbook
Installation Docs

Documentation:
Home
Listing
About Gentoo
Philosophy
Social Contract

Resources:
Bug Tracker
Developer List
Discussion Forums
Gentoo BitTorrents
Gentoo Linux Enhancement Proposals
IRC Channels
Mailing Lists
Mirrors
Name and Logo Guidelines
Online Package Database
Security Announcements
Staffing Needs
Supporting Vendors
View our CVS

Graphics:
Logos and themes
Icons
ScreenShots

Miscellaneous Resources:
Gentoo Linux Store
Gentoo-hosted projects
IBM dW/Intel article archive




List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Ulrich Mueller <ulm@g.o>
Subject: Re: Preserving mtimes for EAPI3
Date: Wed, 1 Apr 2009 13:35:17 +0200
>>>>> On Tue, 31 Mar 2009, Michael Haubenwallner wrote:

> On Mon, 2009-03-30 at 19:14 +0200, Ulrich Mueller wrote:
>> 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}.

Or, even shorter: The basic idea is to preserve the mtimes from ${D}
when merging. Except for "old" mtimes which will be advanced to the
time when the build process began. (And mtimes from the future will
also be fixed, but this case should normally not occur.)

But from discussions in #-dev I conclude that several people would be
happier if just mtimes from ${D} were preserved. In fact, this is the
current Portage and Pkgcore behaviour.

One could think about making step 1 and 2 of above procedure optional
(which was what I had originally in mind, see [1]). Then there would
be no need to change anything in Portage and Pkgcore. Or Portage could
control it via FEATURES, giving the user the choice.

> 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'.

Unfortunately, this will not work. Looking at Lisp again, it may lead
to a fasl file older than the corresponding lisp (imagine that there
could be only a comment change in the source, and the compiled file
would be identical). Also setting mtime to "merge time" will break
some packages (see bug 83877 [2] for an example).

> Maybe this should be done for header files only, or with some black- or
> whitelisting mechanisms, or for files which have mtime<'build time'?

Too complicated, for my taste.

Ulrich

[1] <https://bugs.gentoo.org/show_bug.cgi?id=264130#c12>
[2] <https://bugs.gentoo.org/show_bug.cgi?id=83877>


References:
Preserving mtimes for EAPI3
-- Marijn Schouten (hkBst)
Re: Preserving mtimes for EAPI3
-- Ulrich Mueller
Re: Preserving mtimes for EAPI3
-- Michael Haubenwallner
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Preserving mtimes for EAPI3
Next by thread:
Xorg 1.5.3 is going stable
Previous by date:
Re: Monthly Gentoo Council Reminder for April
Next by date:
Re: Monthly Gentoo Council Reminder for April


Updated Jun 17, 2009

Donate to support our development efforts.

Gentoo Centric Hosting: vr.org

VR Hosted

Tek Alchemy

Tek Alchemy

SevenL.net

SevenL.net

php|architect

php|architect

Copyright 2001-2007 Gentoo Foundation, Inc. Questions, Comments? Email www@gentoo.org.