Quoting J S Bygott ([EMAIL PROTECTED]):
> Package: ca-certificates
> Version: 20061027
> Severity: serious
> Justification: Policy 6.2 (sometimes interacts non-idempotently), 3.9 (error 
> (missing dir) not checked for), 6.8 (removes files at wrong time)
> 
> The postrm, called with "remove", changes into a directory that
> does not always exist.  The results are unpleasant.

Definitely..:)

I'm afraid that my NMU, intended for simple l10n stuff, just revealed
that problem.

> I believe you MUST be able to remove a package more than once,
> idempotently (policy 6.2), but currently, you cannot.  Hence I think
> the bug is serious.  (Apologies if I'm wrong about that.)
> For example, dpkg can't always remove the package if brokenly installed.

Sounds like an RC issue to me, yes.


> Possible solutions:
> 1. in postrm, check if dir exists before cd; or


I have another solution to propose: *no* cd in the directory:

Instead of:

case "$1" in
    remove)
       cd /etc/ssl/certs
       echo -n "Removing hash symlinks in /etc/ssl/certs ..."
       find . -type l -print | while read h
       do
         test -f $h || rm -f $h
       done
       echo done.
       ;;


why not have:


case "$1" in
    remove)
       echo -n "Removing hash symlinks in /etc/ssl/certs ..."
       find /etc/ssl/certs -type l -print | while read h
       do
         test -f $h || rm -f $h
       done
       echo done.
       ;;


Minimal (untested) change, but that should make it, no?

Another brutal solution is of course testing the existence of the
directory before running the find on it

Attachment: signature.asc
Description: Digital signature

Reply via email to