Subject: Re: bin/36308: cpio not replacing on old file
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: dieter roelants <dieter.NetBSD@pandora.be>
List: netbsd-bugs
Date: 10/23/2007 12:10:12
The following reply was made to PR bin/36308; it has been noted by GNATS.
From: dieter roelants <dieter.NetBSD@pandora.be>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/36308: cpio not replacing on old file
Date: Tue, 23 Oct 2007 12:49:06 +0200
Hi,
I believe this to be a correct fix:
Index: options.c
===================================================================
RCS file: /cvsroot/src/bin/pax/options.c,v
retrieving revision 1.100
diff -p -u -r1.100 options.c
--- options.c 23 Apr 2007 18:40:22 -0000 1.100
+++ options.c 22 Oct 2007 20:57:41 -0000
@@ -1472,7 +1472,7 @@ cpio_options(int argc, char **argv)
char *str;
uflag = 1;
- kflag = 1;
+ kflag = 0;
pids = 1;
pmode = 1;
pmtime = 0;
With this patch applied to /usr/src/bin/pax/cpio:
simult:p7:/tmp/s$ uptime > K
simult:p7:/tmp/s$ date > J
simult:p7:/tmp/s$ ls -l ?
-rw-r--r-- 1 dieter wheel 30 Oct 22 23:22 J
-rw-r--r-- 1 dieter wheel 59 Oct 22 23:05 K
simult:p7:/tmp/s$ ls | cpio -p -dmv ../d
../d/J
../d/K
simult:p7:/tmp/s$ date >> J
simult:p7:/tmp/s$ ls | cpio -p -dmv ../d
../d/J
simult:p7:/tmp/s$ ls -l ? ../d/?
-rw-r--r-- 1 dieter wheel 30 Oct 22 23:05 ../d/J
-rw-r--r-- 1 dieter wheel 59 Oct 22 23:05 ../d/K
-rw-r--r-- 1 dieter wheel 60 Oct 22 23:05 J
-rw-r--r-- 1 dieter wheel 59 Oct 22 23:05 K
simult:p7:/tmp/s$ ls | /usr/src/bin/pax/cpio -p -dmv ../d
../d/J
simult:p7:/tmp/s$ ls -l ? ../d/?
-rw-r--r-- 1 dieter wheel 60 Oct 22 23:05 ../d/J
-rw-r--r-- 1 dieter wheel 59 Oct 22 23:05 ../d/K
-rw-r--r-- 1 dieter wheel 60 Oct 22 23:05 J
-rw-r--r-- 1 dieter wheel 59 Oct 22 23:05 K
Kind regards
dieter