tags 602626 patch thanks On 2010-11-06 Kurt Roeckx <k...@roeckx.be> wrote: [...] > In the axiom_20100901-5 (no public log available), libxaw7-dev failed > to install (#602625) and as a result nothing got configured.
> When trying to remove shared-mime-info afterwards, I get: > Removing shared-mime-info ... > Purging configuration files for shared-mime-info ... > cd: 16: can't cd to /usr/share/mime > dpkg: error processing shared-mime-info (--purge): > subprocess installed post-removal script returned error exit status 2 Hello, Reproducing this is easy ... apt-get --purge remove shared-mime-info dpkg --unpack /var/cache/apt/archives/shared-mime-info_0.71-3_i386.deb dpkg --purge shared-mime-info ... and the fix is straightforward. cu andreas
diff -Nru shared-mime-info-0.71/debian/postrm shared-mime-info-0.71/debian/postrm --- shared-mime-info-0.71/debian/postrm 2010-05-29 10:43:29.000000000 +0200 +++ shared-mime-info-0.71/debian/postrm 2010-11-07 13:24:31.000000000 +0100 @@ -6,7 +6,9 @@ if [ "$1" = purge ]; then MIMEDIR="/usr/share/mime" - ( cd $MIMEDIR && rm -rf $(ls |grep -v ^packages$)) - rmdir --ignore-fail-on-non-empty $MIMEDIR + if [ -e $MIMEDIR ]; then + cd $MIMEDIR && rm -rf $(ls |grep -v ^packages$) + rmdir --ignore-fail-on-non-empty $MIMEDIR + fi fi