Hi! * Jon Ander PeƱalba <[email protected]> [091202 11:59]:
> When I try to purge mindi with aptitude I get this error: > /var/lib/dpkg/info/mindi.postrm: line 12: cd: /usr/lib/mindi: No such file or > directory > Aparently mindi is trying to delete the files isolinux-H.cfg, isolinux.cfg, > syslinux-H.cfg and syslinux.cfg that are in that directory, but the directory > doesn't exisct. Looking through the list of rc bugs, I found that one, which seems fixable, but as I don't know how to fix #539678, I just write down, what I found out: Steps to reproduce: 1. Log into a clean chroot (e.g. pbuilder --login) 2. Install mindi 3. apt-get remove mindi _and_ mindi-busybox 4. apt-get purge mindi The problem is, that mindi's postrm script doesn't distinguish between removal and purge (and doesn't check, if /usr/lib/mindi exists). When the package is removed, the postrm script is called, the files are removed, and since this directory is know empty, it is also removed. When the package is purged, the postrm script is called again, trying to change into the now no longer existing directory. Ways to fix this: * Distinguish between remove and purge actions of the script and only act once * Check if the directory exists before changing into it * Remove the files with complete path, instead of the cd and remove stuff * ignore errors on cd I guess the third option is the best, so the trivial patch would be: - ( cd $MINDI_LIB && rm -f isolinux-H.cfg isolinux.cfg syslinux-H.cfg syslinux.cfg ) + rm -f $MINDI_LIB/isolinux-H.cfg + rm -f $MINDI_LIB/isolinux.cfg + rm -f $MINDI_LIB/syslinux-H.cfg + rm -f $MINDI_LIB/syslinux.cfg Best Regards, Alexander -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

