localepurge might be a left-over of a removed package (brrr)
and might no longer exist as a package, therefore make the
check more reliable.
# make sure:
# localepurge localepurge/nopurge multiselect ....
# is set so localepurge works as expected
# make sure:
# localepurge localepurge/nopurge multiselect ....
# is set so localepurge works as expected
-if [ -x $target/usr/sbin/localepurge ] ; then
+if $ROOTCMD dpkg --list localepurge >/dev/null 2>&1 ; then
$ROOTCMD dpkg-reconfigure -f noninteractive localepurge
fi
$ROOTCMD dpkg-reconfigure -f noninteractive localepurge
fi