GNU bug report logs - #6402
[PATCH] rm: added --directory (-d) option

Previous Next

Package: coreutils;

Reported by: Eric Blake <eblake <at> redhat.com>

Date: Fri, 11 Jun 2010 15:15:02 UTC

Severity: normal

Tags: patch

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jim Meyering <jim <at> meyering.net>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#6402: closed ([PATCH] rm: added --directory (-d) option)
Date: Sun, 17 Apr 2011 09:02:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 17 Apr 2011 11:01:26 +0200
with message-id <87pqolckux.fsf <at> rho.meyering.net>
and subject line Re: bug#6402: [PATCH] rm: remove no-op -d option
has caused the GNU bug report #6402,
regarding [PATCH] rm: added --directory (-d) option
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
6402: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6402
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eric Blake <eblake <at> redhat.com>
To: pwplusnick2 <at> gmail.com
Cc: bug-coreutils <at> gnu.org
Subject: Re: [PATCH] rm: added --directory (-d) option
Date: Fri, 11 Jun 2010 09:13:19 -0600
[Message part 3 (text/plain, inline)]
On 03/07/2010 12:47 PM, pwplusnick2 <at> gmail.com wrote:
> Hello again,

Hello,

Sorry for the long delay in reading through my inbox.  It looks like
this was written before we moved to the debbugs interface, making it
easier to lose in the mists of time; but now that I am responding, it
will get an id number to help us remember it.

> 
> I have finally completed my --directory (-d) feature, like the FreeBSD one.

Well, first, I would need to understand if there is any difference
between 'rmdir dir' (specified by POSIX) and 'rm -d dir' - if they are
no different, then how do you justify the extension?  But, since there
are other implementations out there that do it, it might be nice to
support, if only so GNU tools can serve as drop-in replacement for
vendor tools.

> The directory option deletes a directory only if the directory in question is
> empty. This is a safer alternative to the recursive option is some cases where
> you don't want to delete unempty directories.
> 
> I have documented the features. Although I am not the best technical writer, I
> hope that what I have done is adequate. One thing that I have neglected to do,
> intentionally, is to write an automated test. I am not skilled enough or
> confident enough in my Perl or shell scripting ability to write such a test.

Thanks very much for submitting a patch, and especially for including
documentation as part of the patch.  If others on this list agree that
this is worth having, there's still one hurdle to jump through - your
patch is too long to be considered trivial, so you would have to assign
copyright to the FSF, or else we would have to reimplement the patch
from scratch based on your description.  I have not looked at your
patch, for that reason.  Let us know if this is still something you are
willing to pursue.

> 
> I would love to hear what I could have done better, or possibly what I have
> done wrong. Any comments on my code are very much appreciated. That is a big
> part of why I am doing this is to become a better programmer.
> 
> Thank you, and with out further ado, here is the patch.
> 

-- 
Eric Blake   eblake <at> redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Jim Meyering <jim <at> meyering.net>
To: 6402-done <at> debbugs.gnu.org
Subject: Re: bug#6402: [PATCH] rm: remove no-op -d option
Date: Sun, 17 Apr 2011 11:01:26 +0200
Eric Blake wrote:
> On 09/17/2010 03:13 AM, Jim Meyering wrote:
>>> Jim, what do you think of this alternative patch, which avoids the
>>> issue of a new translation string by instead letting getopt parsing
>>> reject -d like any other unknown option?
>>
>> I like it.  Thank you.
>>
>> ...
>>> --- a/NEWS
>> ...
>>> +  rm -d now issues an error rather than being silently ignored.
>>
>> How about a slight change in wording to make clear
>> that the entire "rm" command was not being ignored.
>>
>>    rm's -d now evokes an error;  before, it was silently ignored.
>
> Pushed with that change.

Closing.


This bug report was last modified 14 years and 35 days ago.

Previous Next


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