Bug#456385: Tries to remove non-existent /var/lib/gconf on purge
Trent W. Buck
trentbuck at gmail.com
Sat Dec 15 06:24:18 UTC 2007
Subject: Tries to remove non-existent /var/lib/gconf on purge
Package: gconf2
Version: 2.20.1-1
Severity: normal
Observe the following transcript
$ sudo aptitude purge -y ~c
E: /home/twb/.aptitude is readable but not writable; unable to write configuration file.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
The following packages will be REMOVED:
gconf2{p}
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
(Reading database ... 21135 files and directories currently installed.)
Removing gconf2 ...
Purging configuration files for gconf2 ...
find: /var/lib/gconf: No such file or directory
dpkg: error processing gconf2 (--purge):
subprocess post-removal script returned error exit status 1
Errors were encountered while processing:
gconf2
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
$ cat /var/lib/dpkg/info/gconf2.postrm
#!/bin/sh
set -e
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
find /var/lib/gconf -mindepth 2 -maxdepth 2 -exec rm -rf \{} \;
fi
$
Suggest simply testing for the existence of /var/lib/gconf/ before
calling find, e.g. (untested)
if test \( "$1" = remove -o "$1" = purge \) -a -d /var/lib/gconf/
then find /var/lib/gconf/ -mindepth 2 -maxdepth 2 -delete
fi
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.22-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages gconf2 depends on:
pn gconf2-common <none> (no description available)
ii libc6 2.7-3 GNU C Library: Shared libraries
pn libgconf2-4 <none> (no description available)
ii libglib2.0-0 2.14.3-1 The GLib library of C routines
pn libxml2 <none> (no description available)
ii psmisc 22.5-1 Utilities that use the proc filesy
ii python 2.4.4-6 An interactive high-level object-o
Versions of packages gconf2 recommends:
pn libgtk2.0-0 <none> (no description available)
More information about the pkg-gnome-maintainers
mailing list