[cmake-developers] Fwd: Bug#699657: cmake: cmake -E touch truncates time

Bill Hoffman bill.hoffman at kitware.com
Mon Feb 4 08:52:37 EST 2013


FYI

-------- Original Message --------
Subject: Bug#699657: cmake: cmake -E touch truncates time
Resent-Date: Sun, 03 Feb 2013 01:21:01 +0000
Resent-From: Arnaud Giersch <arnaud.giersch at iut-bm.univ-fcomte.fr>
Resent-To: debian-bugs-dist at lists.debian.org
Resent-CC: arnaud.giersch at iut-bm.univ-fcomte.fr, Modestas Vainius 
<modax at debian.org>
Date: Sun, 03 Feb 2013 02:10:37 +0100
From: Arnaud Giersch <arnaud.giersch at iut-bm.univ-fcomte.fr>
Reply-To: Arnaud Giersch <arnaud.giersch at iut-bm.univ-fcomte.fr>, 
699657 at bugs.debian.org
To: Debian Bug Tracking System <submit at bugs.debian.org>

Package: cmake
Version: 2.8.9-1
Severity: normal

Dear Maintainer,

When using "cmake -E touch" on an existing file, the modification time
is truncated at the precision of a second.  This can be seen e.g. on an
ext4 filesystem.

How to reproduce (file1 is used with "touch", and file2 is used with
"cmake -E touch"):

# In an empty directory...
$ ls -l
total 0

# Create the two files: file1 and file2
$ touch file1 ; cmake -E touch file2 ; ls -l --full-time
-rw-r----- 1 xxxx xxxx 0 2013-02-03 02:00:57.827669619 +0100 file1
-rw-r----- 1 xxxx xxxx 0 2013-02-03 02:00:57.831669779 +0100 file2

# Note that the times look good here (file1 < file2)

# Touch the two files again
$ touch file1 ; cmake -E touch file2 ; ls -l --full-time
-rw-r----- 1 xxxx xxxx 0 2013-02-03 02:01:01.595819478 +0100 file1
-rw-r----- 1 xxxx xxxx 0 2013-02-03 02:01:01.000000000 +0100 file2


Now, the modification time of file2 is *before* that of file1, but file2
was touched *after* file1.

Regards,

Arnaud Giersch







More information about the cmake-developers mailing list