Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Preserving mtimes for EAPI3
Date: Tue, 31 Mar 2009 15:02:00
Message-Id: 18898.12389.755616.385468@a1ihome1.kph.uni-mainz.de
In Reply to: [gentoo-dev] Re: Preserving mtimes for EAPI3 by ABCD
1 >>>>> On Tue, 31 Mar 2009, ABCD wrote:
2
3 > Here is a solution that should work with find(1p) and touch(1p):
4 > Immediately preceding pkg_setup,
5 > `touch "${PORTAGE_BUILDDIR}/.pre_pkg_setup`;
6 > immediately following src_install,
7 > `touch "${PORTAGE_BUILDDIR}"/.post_src_install`.
8
9 > Then, the following call to find(1p) should work:
10
11 > find "${D}" -type f \
12 > \( \! -newer "${PORTAGE_BUILDDIR}"/.pre_pkg_setup -exec \
13 > touch -c -r "${PORTAGE_BUILDDIR}"/.pre_pkg_setup {} + \
14 > -o -newer "${PORTAGE_BUILDDIR}"/.post_src_install -exec \
15 > touch -c -r "${PORTAGE_BUILDDIR}"/.post_src_install {} + \)
16
17 Tested and works well. Seems we cannot do without auxiliary files,
18 since POSIX find doesn't support any reasonable time input format.
19
20 Ulrich