GNU bug report logs - #15926
RFE: unlink command already uses 'unlink' call; make 'rm' use 'remove' call

Previous Next

Package: coreutils;

Reported by: Linda Walsh <coreutils <at> tlinx.org>

Date: Tue, 19 Nov 2013 11:58:02 UTC

Severity: normal

Tags: notabug, patch

Merged with 15943

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eric Blake <eblake <at> redhat.com>
To: Linda Walsh <coreutil <at> tlinx.org>, Bob Proulx <bob <at> proulx.com>
Cc: 15926 <at> debbugs.gnu.org
Subject: bug#15926: RFE: unlink command already uses 'unlink' call; make 'rm' use 'remove' call
Date: Tue, 19 Nov 2013 18:28:54 -0700
[Message part 1 (text/plain, inline)]
On 11/19/2013 05:02 PM, Linda Walsh wrote:

> I'm not see what would break.  instead of failing to remove a non-empty
> directory, it would remove it (if it was empty and permissions allowed).

That's what would break.  Scripts have been written to assume that 'rm
empty_dir' will fail, and your proposal would change that assumption.
Falling through to subsequent commands when you used to bail out early
has all sorts of subtle implications, that we aren't willing to risk.

> I would ask how it would fail in a script -- I.e. we are only talking
> empty directories -- and currently an error would be returned if
> a script tried to do that.  If the script was catching errors or running
> with "-e", the script would terminate under the current implementation.

'set -e' is useless. I highly recommend that script writers avoid it.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 6 years and 225 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.