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

Re: Problems found by piuparts

to, 2006-02-23 kello 02:26 +1100, Anand Kumria kirjoitti:
> On Mon, Feb 20, 2006 at 08:24:53AM +0200, Lars Wirzenius wrote:
> > 
> >         * Creating /usr/local/lib/foo in postinst, but not removing it
> >         in postrm.
> I don't think that is a problem at all; the administrator ought to feel
> free to be able to put things in (say) /usr/local/lib/firmware and not
> have to worry that a full purge / install of the package which happened
> to create that directory will wipe out things there.

I was referring, not entirely clearly, to Policy 9.1.2 "Site-specific

        As mandated by the FHS, packages must not place any files
        in /usr/local, either by putting them in the file system archive
        to be unpacked by dpkg or by manipulating them in their
        maintainer scripts.
        However, the package may create empty directories
        below /usr/local so that the system administrator knows where to
        place site-specific files. These directories should be removed
        on package removal if they are empty.

The package should not, indeed must not, remove anything else than the
directories it creates, and those only if they are empty. Not removing
the directories, however, results in cruft building up on the
filesystem, which, admittedly, is not a big problem, but still something
worth fixing, since it should be very easy.

Incidentally, don't go removing the directories with "rmdir --parents",
that's a good way of removing too much: if /usr/local/lib has only one
subdirectory, and no files, it will be removed, too.

If possible, use code, not comments.

Reply to: