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

Re: rm -rf /usr/somedir in maintainer scripts?

On Sat, 29 Sep 2012 20:29:09 -0400, Nikolaus Rath wrote:

> >>>> I've solved that in the
> >>>> preinst script by 'rm -rf /usr/include/libfm' and I thought yet that was
> >>>> a right step since upgrade 1.0.1 -> 1.0.2 went smooth.
> >>>Somehow that sounds like a really bad idea to me. Admittedly manually
> >>>placing some file in /usr/include/libfm is pretty ugly, but I would
> >>>still certainly not expect that upgrading the libfm package would remove
> >>>it.
> >>>Is that really good practice? Can packages "own" a directory, so that
> >>>anything that the local admin puts there may be removed automatically?

Yes, there's no guarantee that a directory belonging to a package
will be there after the next upgrade.

> No, I'm afraid I don't have any good suggestion for the problem at hand.
> I'm writing this mostly as a user who gets really concerned when he reads
> rm -rf.

On my laptop:

% grep 'rm -rf' /var/lib/dpkg/info/* | wc -l

 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Funny van Dannen: 1000 Dinge

Attachment: signature.asc
Description: Digital signature

Reply to: