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: ABCD <en.ABCD@...>
Subject: Re: Preserving mtimes for EAPI3
Date: Mon, 30 Mar 2009 20:00:03 -0400
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ulrich Mueller wrote:
> But as far as I can see, something along the lines of the following
> two commands [1] should be all that is needed:
> 
>     find "${D}" -type f \( -newermt "@${stamp1}" -o -print0 \) \
>         | ${XARGS} -0 touch -c -d "@${stamp1}"
> 
>     find "${D}" -type f -newermt "@${stamp2}" -print0 \
>         | ${XARGS} -0 touch -c -d "@${stamp2}"
> 
> Variables stamp1 and stamp2 would be assigned from $(date -u +"%s")
> before pkg_setup and after src_install, respectively.
> 
> The second find command is sort of redundant, since it shouldn't
> happen that ${D} contains files with timestamps from the future.
> Maybe it's better to emit a warning in this case.
> 
> Ulrich
> 
> [1] For "find -newermt" we will need >=findutils-4.3.3 which shouldn't
>     be a problem because 4.3.4 went stable in May 2007.


Personally, I would use

    find "${D}" -type f \! -newermt "@${stamp1}" -exec \
        touch -c -d "@${stamp1}" {} +

and

    find "${D}" -type f -newermt "@${stamp2}" -exec \
        touch -c -d "@${stamp2}" {} +

to avoid an unneeded call to xargs.

Just my USD0.02,
- --
ABCD
(and the bikeshed shall be BLUE)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknRXQIACgkQOypDUo0oQOo9DwCeJ3O/cnVo2HIc2J88jSj/C1Tc
50kAoI+slGgo2M+ghs2j+awOrrCXyuEl
=c5R7
-----END PGP SIGNATURE-----



Replies:
Re: Preserving mtimes for EAPI3
-- Ulrich Mueller
References:
Preserving mtimes for EAPI3
-- Marijn Schouten (hkBst)
Re: Preserving mtimes for EAPI3
-- Ulrich Mueller
Re: Preserving mtimes for EAPI3
-- Petteri Räty
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: Preserving mtimes for EAPI3


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.