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 1NDgGR-0001ru-2B for garchives@archives.gentoo.org; Thu, 26 Nov 2009 15:28:11 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 258ECE0904; Thu, 26 Nov 2009 15:28:00 +0000 (UTC) Received: from mail-bw0-f215.google.com (mail-bw0-f215.google.com [209.85.218.215]) by pigeon.gentoo.org (Postfix) with ESMTP id D7CBFE0904 for ; Thu, 26 Nov 2009 15:27:59 +0000 (UTC) Received: by bwz7 with SMTP id 7so661147bwz.26 for ; Thu, 26 Nov 2009 07:27:59 -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=92I1Yg0HwrimrRl8K+8bg77FlHOcUuvnq5+3nUZi+oE=; b=eD0xRz67SjfFv8MzjpJH3pIWCPpOelhaxx/xUvZYLmlbA/bBlRLZsSStVMG8u1R0UF i16GzMRqlUV6EkHVeoGEcgbwxBPCFQxACLCsIUaBdSGbH+5J3oBjW716sz43Vwe/5Ezw tIJKYkBCWRpD3g2oXVWYSEJRoB5HGQMw8M6MY= 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=hpGSjmYtUU+oBaMAZzJtCeSsSlNGUjQ4jER3AOcXTEPpzzdmGtYoY8oWaFe2LOsF38 75RRd5pDVZ6RWl6F5Bq4pkjQuy6O3U3jt6dYYQ8KOYmkNVGmgkSG8Xy3yo9iNC5xB7ve SWJ8+vfpvmxmIuY3kNZIWcfqQWJ4FzxaNRrM8= Received: by 10.204.175.20 with SMTP id v20mr3864068bkz.213.1259249279134; Thu, 26 Nov 2009 07:27:59 -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 13sm271400fxm.1.2009.11.26.07.27.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 26 Nov 2009 07:27:58 -0800 (PST) Date: Thu, 26 Nov 2009 15:27:53 +0000 From: Ciaran McCreesh To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] mtime preservation Message-ID: <20091126152753.607cffa7@snowcone> In-Reply-To: <19214.13680.288961.629420@a1i15.kph.uni-mainz.de> 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> <20091125212718.5deb42f8@snowcone> <20091125221327.324e11fb@snowcone> <19213.46817.620937.656202@a1i15.kph.uni-mainz.de> <20091126001540.08a6e193@snowmobile> <4B0DD08D.8040505@gentoo.org> <19214.13680.288961.629420@a1i15.kph.uni-mainz.de> 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_/UZfqhkXNCRbAv6.kAr2tLqg"; protocol="application/pgp-signature" X-Archives-Salt: 78d09213-7f66-4439-bf14-0ea02ebf8aa3 X-Archives-Hash: 14a348e6414f42b2f09b58239b12f3bc --Sig_/UZfqhkXNCRbAv6.kAr2tLqg Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 26 Nov 2009 08:59:44 +0100 Ulrich Mueller wrote: > >> Not non-preservation. Partial and inconsistent corruption. >=20 > > Wouldn't "loss of precision" be a more accurate description? >=20 > Yes. Or even "rounding". No, corruption, including of the seconds part, is the right way to describe it. > > Of the known packages which require timestamp preservation, do any > > of them use sub-second precision in their timestamp comparisons? >=20 > I can speak for Emacs only, where the comparison code (in fileio.c) is > as follows: >=20 > if (stat (SDATA (absname1), &st) < 0) > return Qnil; >=20 > mtime1 =3D st.st_mtime; >=20 > if (stat (SDATA (absname2), &st) < 0) > return Qt; >=20 > return (mtime1 > st.st_mtime) ? Qt : Qnil; >=20 > It uses stat(2), therefore nanoseconds are ignored. Uh, two things. First, Portage sometimes corrupts the second part too. Second, [1]: > For compatibility with earlier versions of this standard, the st_atime > macro shall be defined with the value st_atim.tv_sec. Similarly, > st_ctime and st_mtime shall be defined as macros with the values > st_ctim.tv_sec and st_mtim.tv_sec, respectively. Note that POSIX considers st_mtime to be legacy, and thinks you should be using st_mtim instead. Do you want this to break when Emacs starts following the newer standard, or do you want to get this right now so we won't have to have the discussion again a year later? [1]: http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html --=20 Ciaran McCreesh --Sig_/UZfqhkXNCRbAv6.kAr2tLqg Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) iEYEARECAAYFAksOnnwACgkQ96zL6DUtXhFUUQCgtnhRXg7loU4rc+OaWGDoihGb NigAn3JWWQAdVDvOi4CcEo6HBOj6ETIr =+ZqA -----END PGP SIGNATURE----- --Sig_/UZfqhkXNCRbAv6.kAr2tLqg--