From: Ciaran McCreesh <ciaran.mccreesh@googlemail.com>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] mtime preservation
Date: Thu, 26 Nov 2009 15:27:53 +0000 [thread overview]
Message-ID: <20091126152753.607cffa7@snowcone> (raw)
In-Reply-To: <19214.13680.288961.629420@a1i15.kph.uni-mainz.de>
[-- Attachment #1: Type: text/plain, Size: 1576 bytes --]
On Thu, 26 Nov 2009 08:59:44 +0100
Ulrich Mueller <ulm@gentoo.org> wrote:
> >> Not non-preservation. Partial and inconsistent corruption.
>
> > Wouldn't "loss of precision" be a more accurate description?
>
> 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?
>
> I can speak for Emacs only, where the comparison code (in fileio.c) is
> as follows:
>
> if (stat (SDATA (absname1), &st) < 0)
> return Qnil;
>
> mtime1 = st.st_mtime;
>
> if (stat (SDATA (absname2), &st) < 0)
> return Qt;
>
> return (mtime1 > st.st_mtime) ? Qt : Qnil;
>
> 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
--
Ciaran McCreesh
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2009-11-26 15:28 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <19184.25176.380022.392451@a1i15.kph.uni-mainz.de>
[not found] ` <19186.42949.760878.199957@a1i15.kph.uni-mainz.de>
[not found] ` <20091108191439.3fcee79d@snowcone>
[not found] ` <7c612fc60911090718y144319f5lc9827a5e2e153c2@mail.gmail.com>
[not found] ` <20091109153429.502e272f@snowcone>
[not found] ` <19193.4389.637969.727075@a1i15.kph.uni-mainz.de>
[not found] ` <20091119221248.539eedd9@snowmobile>
[not found] ` <7c612fc60911191614h5e37c849y50ad217a828fa744@mail.gmail.com>
[not found] ` <20091120001820.7274bdf7@snowmobile>
[not found] ` <4B07362D.2010108@gentoo.org>
2009-11-23 18:49 ` [gentoo-dev] mtime preservation Denis Dupeyron
2009-11-23 20:39 ` Zac Medico
2009-11-23 23:19 ` Brian Harring
2009-11-24 14:26 ` [gentoo-dev] " Duncan
2009-11-24 22:21 ` [gentoo-dev] " Ciaran McCreesh
2009-11-26 1:28 ` Brian Harring
2009-11-26 12:41 ` David Leverton
2009-11-26 13:21 ` Brian Harring
2009-11-26 18:22 ` David Leverton
2009-11-26 15:15 ` Ciaran McCreesh
2009-11-25 21:13 ` [gentoo-dev] " Denis Dupeyron
2009-11-25 21:27 ` Ciaran McCreesh
2009-11-25 21:52 ` Duncan
2009-11-25 22:13 ` Ciaran McCreesh
2009-11-25 22:59 ` [gentoo-dev] " Ulrich Mueller
2009-11-26 0:15 ` Ciaran McCreesh
2009-11-26 0:49 ` Zac Medico
2009-11-26 1:14 ` Brian Harring
2009-11-26 5:26 ` Zac Medico
2009-11-26 5:33 ` [gentoo-dev] " Duncan
2009-11-26 5:35 ` [gentoo-dev] " Brian Harring
2009-11-26 5:30 ` [gentoo-dev] " Duncan
2009-11-26 12:35 ` [gentoo-dev] " David Leverton
2009-11-26 12:40 ` [gentoo-dev] " Duncan
2009-11-26 21:55 ` Zac Medico
2009-11-26 13:31 ` [gentoo-dev] " Brian Harring
2009-11-26 15:24 ` Ciaran McCreesh
2009-11-26 7:59 ` Ulrich Mueller
2009-11-26 9:07 ` Ulrich Mueller
2009-11-26 9:54 ` Łukasz Michalik
2009-11-26 11:47 ` Ulrich Mueller
2009-11-26 15:27 ` Ciaran McCreesh [this message]
2009-11-26 15:21 ` Ciaran McCreesh
2009-11-26 7:51 ` Ulrich Mueller
2009-11-26 5:07 ` [gentoo-dev] " Duncan
2009-11-26 5:04 ` Duncan
2009-11-28 20:57 ` Peter Hjalmarsson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091126152753.607cffa7@snowcone \
--to=ciaran.mccreesh@googlemail.com \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox