GNU bug report logs - #10819
[BUG][RM]

Previous Next

Package: coreutils;

Reported by: "jeremy.magrin <at> epitech.eu" <jeremy.magrin <at> epitech.eu>

Date: Wed, 15 Feb 2012 17:11:02 UTC

Severity: normal

Tags: moreinfo

Done: "Voelker, Bernhard" <bernhard.voelker <at> siemens-enterprise.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Philip Rowlands <phr+coreutils <at> dimebar.com>
Cc: 10819 <at> debbugs.gnu.org, bug-autoconf <at> gnu.org, jim <at> meyering.net, dave_br <at> gmx.com, eblake <at> redhat.com, bernhard.voelker <at> siemens-enterprise.com
Subject: bug#10819: POSIX will say running "rm -f" with no argument is OK
Date: Thu, 16 Feb 2012 21:41:03 +0100
Severity: wishlist

[CC:ing bug-automake, so that we won't forget about this issue]

Reference:
  <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10819#40>

POSIX will say in a future version that running "rm -f" with no argument is OK;
we might simplify several automake-generated "cleaning" rules accordingly, to
get rid of the awful idiom:

  test -z "$(VAR)" || rm -f $(VAR)

On 02/16/2012 08:15 PM, Philip Rowlands wrote:
> On 16/02/2012 18:58, Eric Blake wrote:
> 
>>> so that we could simplify a bunch of automake recipes); but a more extensive
>>> probing is needed in this matter I guess.  And if you are right (as I hope),
>>> then this 'rm' feature could be documented in the Autoconf manual.
>>
>> Yep, I think that's appropriate, as it is unlikely that we will come up
>> with any counterexamples any time soon.
> 
> As the now-POSIX-infringing behaviour is simple to detect, couldn't automake detect
> it early and die with a helpful message, or is that contrary to its philosophy?
>
Well, that might be an overkill, since it appears that all the non-museum
implementations of 'rm' have the behaviour we want.  But I agree that, in case
we ever stumble upon a system violating this new expectation, adding proper
configure-time probing and warning might be helpful (and might convince the
users of such an inferior system to start using GNU coreutils).

Regards,
  Stefano




This bug report was last modified 13 years and 94 days ago.

Previous Next


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