Lars Wirzenius <[EMAIL PROTECTED]> wrote: > ti, 2005-10-11 kello 14:37 +0200, Frank Küster kirjoitti: >> >> Do you have a log of the piuparts run (or whatever tool you used)? I >> don't understand the problems that calling ucf in postrm causes. > > postrm can't rely on non-essential packages when being called during > purge (policy 7.2). Specifically, dpkg gives no guarantee that any > packages being depended on exist anymore on the system, meaning that ucf > might not be there.
This we know, and therefore we do purge_ucf_file () { local conffile="$1" purge_file $conffile if [ -x /usr/bin/ucf ]; then ucf --purge "${conffile}" fi } purge) # purge texmf_parts for file in $UCF_FILES; do purge_ucf_file /etc/texmf/$file done > This is what happens to happen with piuparts (well, > I tried to make piuparts cause it to happen). I've attached the log, in > case it clarifies things. > > (I'd be happy to explain any parts of the log that may be unclear.) Indeed I don't completely understand it, or your interpretation of it. Here's the relevant part: 0m5.5s DEBUG: Command failed (status=256), but ignoring error: 'chroot /tmp/tmpTZbIYF dpkg --remove ucf' 0m5.5s DEBUG: Starting command: chroot /tmp/tmpTZbIYF dpkg --remove tex-common 0m5.5s DUMP: (Reading database ... 7686 files and directories currently installed.) 0m5.5s DUMP: Removing tex-common ... 0m5.5s DEBUG: Command ok: 'chroot /tmp/tmpTZbIYF dpkg --remove tex-common' 0m5.5s DEBUG: Starting command: chroot /tmp/tmpTZbIYF dpkg --remove --pending 0m5.6s DUMP: (Reading database ... 7603 files and directories currently installed.) 0m5.6s DUMP: Removing ucf ... 0m5.6s DEBUG: Command ok: 'chroot /tmp/tmpTZbIYF dpkg --remove --pending' 0m5.6s DEBUG: Starting command: chroot /tmp/tmpTZbIYF dpkg --purge ucf 0m5.6s DUMP: (Reading database ... 7591 files and directories currently installed.) 0m5.6s DUMP: Removing ucf ... 0m5.6s DUMP: Purging configuration files for ucf ... 0m5.6s DUMP: rmdir: `/var/lib/ucf/cache': Directory not empty 0m5.8s DUMP: rmdir: `/var/lib/ucf/cache': Directory not empty 0m5.8s DUMP: dpkg - warning: while removing ucf, directory `/var/lib/ucf' not empty so not removed. 0m5.9s DEBUG: Command ok: 'chroot /tmp/tmpTZbIYF dpkg --purge ucf' 0m5.9s DEBUG: Starting command: chroot /tmp/tmpTZbIYF dpkg --remove --pending 0m5.9s DEBUG: Command ok: 'chroot /tmp/tmpTZbIYF dpkg --remove --pending' 0m5.9s DEBUG: Starting command: chroot /tmp/tmpTZbIYF dpkg --purge tex-common 0m5.9s DUMP: (Reading database ... 7589 files and directories currently installed.) 0m5.9s DUMP: Removing tex-common ... 0m5.9s DUMP: Purging configuration files for tex-common ... 0m6.0s DEBUG: Command ok: 'chroot /tmp/tmpTZbIYF dpkg --purge tex-common' I would say from this that files left in /var/lib/ucf/cache aren't our fault, but simply ucf's. The error message comes before our postinst is called with "purge". The ls-R file is our responsibility, of course. Regards, Frank -- Frank Küster Inst. f. Biochemie der Univ. Zürich Debian Developer