SENSITIVE="wmctrl xserver-xephyr lightdm policykit"
PACKAGES=`apt-get --dry-run dist-upgrade | awk '/^The following packages will be upgraded:/,/^[1-9]./' | tail -n +2 | head -n -1`
echo "Searching sensitive packages:"
for i in $SENSITIVE; do
echo $PACKAGES | grep $i 2>&1 >/dev/null && echo Found: $i && FOUND=1
if [ $FOUND -eq 0 ]; then
echo No sensitive packages found in upgrade.
The script can be run after apt-get update to see if any of the packages enumerated in "SENSITIVE" are to be upgraded this time. If yes, care must be taken.
Policy kit needs a paragraph of its own. At this moment Debian Wheezy comes with policykit-1 version 0.105. This is the last version in which the actions' permissions are customized using .pkla files. From 0.106 on (0.107 is the latest now) the format and naming of the directories and files has changed.
Another thing is systemd, which one day can become The Right Way of doing things.