If deborphan's keep file doesn't exist yet, it fails with:
| fseek on /var/lib/deborphan/keep: Invalid argument
While at it, no longer ignore failing deborphan execution
but error out on failure.
# bind9-dnsutils package is available in all our supported Debian releases
if [[ -r "${target}/usr/share/doc/dnsutils" ]] && [ -x "${target}/usr/bin/deborphan" ] ; then
echo "Adding dnsutils to deborphan whitelist"
- $ROOTCMD deborphan --add-keep dnsutils || /bin/true
+ # workaround for https://bugs.debian.org/929273 ("fseek on /var/lib/deborphan/keep: Invalid argument")
+ $ROOTCMD touch /var/lib/deborphan/keep
+ $ROOTCMD deborphan --add-keep dnsutils
fi
## END OF FILE #################################################################