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.


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to