Your message dated Tue, 21 Aug 2007 15:30:17 -0400
with message-id <[EMAIL PROTECTED]>
and subject line Bug#439033: coreutils: touch -c behaves incorrectly
(non-POSIX) and is not sufficiently documented
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--- Begin Message ---
Package: coreutils
Version: 5.97-5.4
Severity: normal
POSIX says about 'touch'[*]:
-c
Do not create a specified file if it does not exist. Do not write
any diagnostic messages concerning this condition.
[*] http://www.opengroup.org/onlinepubs/009695399/utilities/touch.html
But under some conditions, 'touch' writes a diagnostic message when
the file doesn't exist. For instance:
vin:~> mkdir dir
vin:~> chmod 000 dir
vin:~> /usr/bin/touch -c dir/file
/usr/bin/touch: setting times of `dir/file': Permission denied
zsh: exit 1 /usr/bin/touch -c dir/file
vin:~[1]>
Note that the BSD 'touch' does not have this problem, as shown by the
test below (under Mac OS X):
prunille:~> mkdir dir
prunille:~> chmod 000 dir
prunille:~> /usr/bin/touch -c dir/file
prunille:~>
Also the touch(1) man page doesn't say that no diagnostic messages
are written when the file doesn't exist. Users are not required to
look at the POSIX standard to get the full documentation.
Ditto for the manual (coreutils.info).
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.18-5-686-bigmem (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Versions of packages coreutils depends on:
ii libacl1 2.2.42-1 Access control list shared library
ii libc6 2.6.1-1 GNU C Library: Shared libraries
ii libselinux1 2.0.15-2+b1 SELinux shared libraries
coreutils recommends no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
On Tue, Aug 21, 2007 at 09:19:24PM +0200, Vincent Lefevre wrote:
POSIX says about 'touch'[*]:
-c
Do not create a specified file if it does not exist. Do not write
any diagnostic messages concerning this condition.
[*] http://www.opengroup.org/onlinepubs/009695399/utilities/touch.html
But under some conditions, 'touch' writes a diagnostic message when
the file doesn't exist. For instance:
vin:~> mkdir dir
vin:~> chmod 000 dir
vin:~> /usr/bin/touch -c dir/file
/usr/bin/touch: setting times of `dir/file': Permission denied
zsh: exit 1 /usr/bin/touch -c dir/file
vin:~[1]>
It's not giving a diagnostic because the file doesn't exist, it's giving
a diagnostic because it can't even tell whether the file exists (that
is, you'll get the same error whether the file is there or not). POSIX
doesn't say "-c do not print any diagnostic messages for this file at
all", so I think that coreutils is behaving correctly.
Mike Stone
--- End Message ---