#!/bin/sh -e

test -x /usr/share/apt-listbugs/aptcleanup || exit 0
test -x /usr/sbin/apt-listbugs || exit 0
test -f /etc/apt/preferences || exit 0

cp -a /etc/apt/preferences /etc/apt/preferences.apt-listbugs.$$
/usr/share/apt-listbugs/aptcleanup > /etc/apt/preferences.apt-listbugs.$$
mv /etc/apt/preferences.apt-listbugs.$$ /etc/apt/preferences

