Subject: cpio not replacing on old file
To: None <netbsd-help@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-help
Date: 03/23/2007 12:18:44
I am doing:

 find . | grep -v /.svn | cut -d / -f 2- | cpio -vvvpdm ../book

Basically, it looks for new TeX documents and copies over to a different 
directory for doing some builds. The first time (to empty ../book/ 
directory) it works fine.

I edit a file but it are not copied second time I do the same cpio. (Even 
for more than one file modified.)

The -v shows:
../book/ToC.tex

But it is not updated.

$ ls -l ToC.tex  ../book/ToC.tex 
-rw-r--r--  1 reed  staff  5545 Feb 24 14:07 ../book/ToC.tex
-rw-r--r--  1 reed  staff  5557 Mar 23 11:57 ToC.tex

I had same behaviour on a DragonFly BSD box.

But it works as I expect on Linux with cpio (GNU cpio) 2.6.

Is this a bug on NetBSD (and DragonFly)?

I also tried using complete destination path with cpio instead of .. but 
same problem. Verbose showed the single file updated -- but it wasn't.

I also tried --insecure but I never had any warning before and that didn't 
help.

I have been using cpio --pass-through for years. Maybe I am missing 
something obvious here. Any clues?

  Jeremy C. Reed