From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1NDPOq-0002R5-U2 for garchives@archives.gentoo.org; Wed, 25 Nov 2009 21:27:45 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2F8C3E0A8A; Wed, 25 Nov 2009 21:27:26 +0000 (UTC) Received: from mail-fx0-f215.google.com (mail-fx0-f215.google.com [209.85.220.215]) by pigeon.gentoo.org (Postfix) with ESMTP id C9CB9E0A8A for ; Wed, 25 Nov 2009 21:27:25 +0000 (UTC) Received: by fxm7 with SMTP id 7so154412fxm.29 for ; Wed, 25 Nov 2009 13:27:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type; bh=FqSYuo3rdHGZsOHuTEfZQ8Tj1gvVQf6GpJgALB6JPzE=; b=vrwKvfpM0ixXxPa33SXHkdKrw2Z+3kygnGzHI/eQNlRYwvfRJAVQcy1438sE4/lB3C N7+Hi2Yu3VfERdDOsn+e2JeACLcIuXct0SI6fQH+xNFnAjmKbsWRryRo2hZk/QznzALI SZVfopHMIEFmw+DFPqiVhd7dgPogYKi5VOEfU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; b=F4ZwU6K0tHnZMyMRgEeY9CzQhO8CJIBqErK1b+Uj0Knh2kD88K7PRC++J9WtWLlBno uZWVO14qDI/4+7NLRMxTIccSWcHLnHryms4k6mzQV/caL4eP4eR+OYJxtWjiFG1vOztR WrUcMAogiw5I5R1ewoHAycnB+qOS1lZlRuDtQ= Received: by 10.87.40.30 with SMTP id s30mr6588172fgj.25.1259184444904; Wed, 25 Nov 2009 13:27:24 -0800 (PST) Received: from snowcone (92-235-187-79.cable.ubr18.sgyl.blueyonder.co.uk [92.235.187.79]) by mx.google.com with ESMTPS id e3sm13648005fga.1.2009.11.25.13.27.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 25 Nov 2009 13:27:24 -0800 (PST) Date: Wed, 25 Nov 2009 21:27:18 +0000 From: Ciaran McCreesh To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Re: mtime preservation Message-ID: <20091125212718.5deb42f8@snowcone> In-Reply-To: <7c612fc60911251313i705a182as6cf50402c7829beb@mail.gmail.com> References: <19184.25176.380022.392451@a1i15.kph.uni-mainz.de> <20091108191439.3fcee79d@snowcone> <7c612fc60911090718y144319f5lc9827a5e2e153c2@mail.gmail.com> <20091109153429.502e272f@snowcone> <19193.4389.637969.727075@a1i15.kph.uni-mainz.de> <20091119221248.539eedd9@snowmobile> <7c612fc60911191614h5e37c849y50ad217a828fa744@mail.gmail.com> <20091120001820.7274bdf7@snowmobile> <4B07362D.2010108@gentoo.org> <7c612fc60911231049n4a51ddb0u30ae72d8ed93cdec@mail.gmail.com> <7c612fc60911251313i705a182as6cf50402c7829beb@mail.gmail.com> X-Mailer: Claws Mail 3.7.3 (GTK+ 2.16.6; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/gMDIVUtliJ42v3kduOqdQHb"; protocol="application/pgp-signature" X-Archives-Salt: d1072155-7b16-44c6-88a4-6ec1a60d964a X-Archives-Hash: db16c22ec19108352bb4ffb13d2d57c3 --Sig_/gMDIVUtliJ42v3kduOqdQHb Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 25 Nov 2009 14:13:58 -0700 Denis Dupeyron wrote: > A quick note to tell you that I have tried to look for examples of > breakage due to how mtime preservation is currently implemented in > portage. Unfortunately I didn't find anything, maybe because I'm not > knowledgeable enough or because I can't afford to spend any more time > on this. If any of you can provide an example then please do so. Portage uses two ways of merging a file: os.rename() and the manual way. os.rename() correctly preserves mtimes. Python's os.utime call, which is what Portage uses to preserve mtimes for files that it installs the hard way, and which is not a wrapper for the Unix utime call, uses an IEEE 754 double to handle timestamps. But a double only gives sixteen accurate decimal digits, and you've got ten to the left of the decimal point, leaving only six reliably preserved, with the remaining three digits being corrupted. Thus, packages can end up being installed with some files having accurately-preserved mtimes, and some having corrupted mtimes, which will lead to mtime comparisons giving incorrect results. --=20 Ciaran McCreesh --Sig_/gMDIVUtliJ42v3kduOqdQHb Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) iEYEARECAAYFAksNoToACgkQ96zL6DUtXhGjNQCfZh9s9ccCMZfEIEJXHVhJZj4+ rsIAoKGhNUMhD+WrONI3n+UUnG+IfkAS =h8qc -----END PGP SIGNATURE----- --Sig_/gMDIVUtliJ42v3kduOqdQHb--