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: Eric Blake <eblake <at> redhat.com>
Cc: "10819 <at> debbugs.gnu.org" <10819 <at> debbugs.gnu.org>, Davide Brini <dave_br <at> gmx.com>, Jim Meyering <jim <at> meyering.net>, "Voelker, Bernhard" <bernhard.voelker <at> siemens-enterprise.com>
Subject: bug#10819: [BUG][RM]
Date: Thu, 16 Feb 2012 19:38:57 +0100
Hi Eric.

On 02/16/2012 04:28 PM, Eric Blake wrote:
>
> You can always use 'rm -rf dummy $file_list' without having to check for
> whether $file_list is empty, but yes, that is the primary reasoning why
> -f with no options behaves differently than any other case with no options.
> 
> FYI: I just opened a POSIX bug report, asking that this usage be
> codified (since everyone that I tested already does it):
> http://austingroupbugs.net/view.php?id=542
> 
Still, I vaguely recall that there are some 'rm' implementations out there
which fails upon "rm -f" (with no arguments); and that's why automake uses
the ugly idiom:

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

in a lot of recipes.  Now, I can't tell off-hand which systems those were,
nor if they actually exist (and in fact I'd *love* to be proven wrong here,
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.

Regards,
  Stefano




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

Previous Next


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