diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-09-08 17:54:10 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-09-08 17:54:10 -0700 |
commit | 7a54703a8b28326bd428327f68e726238eba02df (patch) | |
tree | 668780227ee906dc15b0f83184225ce2aa0a6c26 | |
parent | 08b350a53b52adb18947ce2f1ffc56a8d59b02ba (diff) | |
download | portage-7a54703a8b28326bd428327f68e726238eba02df.tar.gz portage-7a54703a8b28326bd428327f68e726238eba02df.tar.bz2 portage-7a54703a8b28326bd428327f68e726238eba02df.zip |
EbuildPhase: bump WORKDIR timestamp after unpack
This will fix bug #332217.
-rw-r--r-- | pym/_emerge/EbuildPhase.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pym/_emerge/EbuildPhase.py b/pym/_emerge/EbuildPhase.py index fe44abcbd..c4881d465 100644 --- a/pym/_emerge/EbuildPhase.py +++ b/pym/_emerge/EbuildPhase.py @@ -1,10 +1,11 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import gzip import io import sys import tempfile +import time from _emerge.AsynchronousLock import AsynchronousLock from _emerge.BinpkgEnvExtractor import BinpkgEnvExtractor @@ -213,7 +214,13 @@ class EbuildPhase(CompositeTask): settings = self.settings _post_phase_userpriv_perms(settings) - if self.phase == "install": + if self.phase == "unpack": + # Bump WORKDIR timestamp, in case tar gave it a timestamp + # that will interfere with distfiles / WORKDIR timestamp + # comparisons as reported in bug #332217. + timestamp = time.time() + os.utime(settings["WORKDIR"], (timestamp, timestamp)) + elif self.phase == "install": out = io.StringIO() _post_src_install_write_metadata(settings) _post_src_install_uid_fix(settings, out) |