coreutils 6.10-2, cygwin 1.5.25-15, cp -af loss of precision in timestamp
Rob Walker
rwalker@qualcomm.com
Tue Dec 8 19:42:00 GMT 2009
I've found that cp -af doesn't preserve the least significant bits of
the "Modify" field of a file time.
I ran into this issue while using "cp -af" to install files via GNU make.
Simple makefile:
there.txt: hi.txt
cp -af hi.txt there.txt
The above makefile never manages to finish updating there.txt if hi.txt
has a finely grained timestamp, as hi.txt does below:
rwalker@pariah> stat hi.txt
File: `hi.txt'
Size: 0 Blocks: 0 IO Block: 65536 regular
empty file
Device: 27537939h/659781945d Inode: 15199648742824059 Links: 1
Access: (0666/-rw-rw-rw-) Uid: ( 1005/ rwalker) Gid: ( 513/ None)
Access: 2009-12-07 17:00:05.490875000 -0800
Modify: 2009-12-07 17:25:09.084000200 -0800
Change: 2009-12-08 09:29:04.756500000 -0800
After running make with the above makefile:
rwalker@pariah> stat there.txt
File: `there.txt'
Size: 0 Blocks: 0 IO Block: 65536 regular
empty file
Device: 27537939h/659781945d Inode: 17451448556568056 Links: 1
Access: (0666/-rw-rw-rw-) Uid: ( 1005/ rwalker) Gid: ( 513/ None)
Access: 2009-12-07 17:00:05.490875000 -0800
Modify: 2009-12-07 17:25:09.084000000 -0800
Change: 2009-12-08 09:37:45.600250000 -0800
Note that Modify differs only in the 3 least significant digits (200 on
foo.txt, 000 on there.txt).
Taking make out of the equation changes nothing.
Ending up with a file with a time stamp of the above fine-grained form
is somewhat rare, I had to write a short Windows program to induce it.
Thanks in advance for any help.
-Rob
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20091208/412a4e82/attachment.ksh>
-------------- next part --------------
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list