NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: bin/37944: [patch]: gzip cannot preserve utimes() because it first sets chflags()
The following reply was made to PR bin/37944; it has been noted by GNATS.
From: matthew green <mrg%eterna.com.au@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: re: bin/37944: [patch]: gzip cannot preserve utimes() because it first
sets chflags()
Date: Mon, 04 Feb 2008 16:23:06 +1100
>How-To-Repeat:
$ /usr/bin/touch /tmp/foo
$ /bin/chflags uchg /tmp/foo
$ /usr/bin/gzip -v /tmp/foo
gzip: couldn't utimes: /tmp/foo.gz: Operation not permitted
/tmp/foo: -99.9% -- replaced with /tmp/foo.gz
>Fix:
I sent a simple patch to FreeBSD, making it run utimes() / chflags()
http://www.freebsd.org/cgi/query-pr.cgi?pr=120208
Note that src/usr.bin/compress/compress.c does the right thing...
interesting.... won't this have the problem of setting the
file mod time to "now"? i'm not sure how to avoid that,
and also fix this bug...
ideas anyone?
.mrg.
Home |
Main Index |
Thread Index |
Old Index