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

Re: Problems found by piuparts



Don Armstrong <don@debian.org> wrote:

> On Wed, 22 Feb 2006, Frank Küster wrote:
>> Adeodato Simó <dato@net.com.org.es> wrote:
>> >   Correct, so one would put in foo.postrm:
>> >
>> >     rmdir --ignore-fail-on-non-empty /usr/local/lib/foo
>> 
>> That's not sufficient, because /usr/local may be mounted ro, and
>> therefore the command may fail even if the directory is empty.
>> 
>> rmdir --ignore-fail-on-non-empty /usr/local/lib/foo || true
>
> So you're suggesting that it's better to fail silently instead of
> failing loudly?

Yes, please read Policy 9.1.2.

The reason is that we cannot assume that there are any write permissions
on /usr/local.  See e.g. http://bugs.debian.org/338638: The reporter has
mounted /usr/local from a server at his site, and the admin on the
individual machines don't have write permissions on that share.
Therefore it's not possible to create any directories, but on the other
hand it's equally impossible to remove any directories created by the
share's admin.  Even if they are empty.

There's no problem with that, unless a maintainer script tries to do it
*and* fails if it can't.

Regards, Frank
-- 
Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX)



Reply to: