bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature request: rm should implement option -p, --parents


From: Pádraig Brady
Subject: Re: Feature request: rm should implement option -p, --parents
Date: Tue, 7 Jul 2009 11:40:18 +0100
User-agent: Thunderbird 2.0.0.6 (X11/20071008)

Guido Flohr wrote:
> 
> The case where the directory part is not known is quite frequent imho. I
> configured a random GNU package (in this case gettext from the current
> git sources), configured it with "--prefix=/tmp/my_gettext", then
> "make", "make install", and "make uninstall", and finally ran find over
> the directory /tmp/my_gettext.  It finds 194 directories and one regular
> file (/tmp/my_gettext/share/info/dir, but that is a nuisance of its
> own).  So not even packages that use GNU autoconf clean up after
> themselves.  Now imagine you had to implement a cleanup mechanism.  With
> "rm -p" you would simply do one check whether rm understands "-p", and
> then write to your Makefile:
> 
>     RM = /bin/rm -p

Thanks for persisting as you make a good point.
But I'd be worried about using rm -p generally, as I might delete an
empty dir that didn't belong to me. Though if passed relative
paths that would be alleviated I suppose.
The package above should really be calling rmdir -p on relative dirs
created previously created with install -d or mkdir -p.

On a related note see:
https://www.redhat.com/archives/fedora-maintainers/2006-October/msg00059.html
https://www.redhat.com/archives/fedora-devel-list/2009-January/msg02326.html

I'll think some more about this,

cheers,
Pádraig.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]