On 2009-07-25 20:34 +0200, Raphael Geissert wrote:

> Package: dpkg
> Version: 1.15.3.1
> Affects: php5-cli
>
> While looking for some false positives on the results by piuparts I found the 
> following:
>
> ERROR: Package purging left files on system:
>   /etc/php5      owned by: php5-common, php5-cli, php5-suhosin
>
> But the directory is completely empty:

Not at the time dpkg is removing ph5-cli.

> DEBUG: Starting command: 
> ['chroot', '/tmp/tmpGu5Iec', 'dpkg', '--purge', 'php5-cli']
> DUMP:
>   (Reading database ... 8210 files and directories currently installed.)
>   Removing php5-cli ...
>   Purging configuration files for php5-cli ...
> DEBUG: Command ok: ['chroot', '/tmp/tmpGu5Iec', 'dpkg', '--purge', 'php5-cli']

The php5-cli package uses ucf to manage a configuration file under
/etc/php5 that it removes when the package is purged, see the attached
postrm script.  At that time, dpkg has already cleared the file list.

I'm not sure that anything can be done in dpkg to avoid this, because
ucf operates totally outside dpkg's control.  Note that the problem does
not exist for conffiles, where dpkg keeps the directory containing them
in the package's file list (since version 1.13.20).

Sven

#! /bin/sh

set -e

phpini=/etc/php5/cli/php.ini

case "$1" in
purge)
        if which ucf >/dev/null 2>&1; then
                ucf --purge $phpini
        fi
        rm -f $phpini
        ;;
esac



exit 0

Reply via email to