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: Michael Haubenwallner <haubi@g.o>
Subject: Re: Preserving mtimes for EAPI3
Date: Tue, 31 Mar 2009 10:30:27 +0200
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



Replies:
Re: Preserving mtimes for EAPI3
-- Ulrich Mueller
References:
Preserving mtimes for EAPI3
-- Marijn Schouten (hkBst)
Re: Preserving mtimes for EAPI3
-- Ulrich Mueller
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Preserving mtimes for EAPI3
Next by thread:
Re: Preserving mtimes for EAPI3
Previous by date:
Re: Preserving mtimes for EAPI3
Next by date:
Re: Re: Small change: Global USE flag nsplugin


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.