Not sure if this is specific to backports; have tried it on two machines, one was ok, the other broken:
Seems to be something broken with debconf.
root@webby:~# export DEBCONF_DEBUG=developer
root@webby:~# needrestart
debconf (developer): frontend started
debconf (developer): Trying to find a templates file..
debconf (developer): Trying /usr/sbin/needrestart.templates
debconf (developer): Trying /usr/share/debconf/templates/needrestart.templates
debconf (developer): Couldn't find a templates file.
debconf (developer): frontend running, package name is
debconf (developer): starting /usr/sbin/needrestart
debconf (developer): <-- VERSION 2.0
debconf (developer): --> 0 2.0
debconf (developer): <-- CAPB backup
debconf (developer): --> 0 multiselect escape backup
debconf (developer): <-- X_LOADTEMPLATEFILE /usr/share/needrestart/needrestart.templates
debconf (developer): --> 0
Scanning processes...
Scanning candidates...
Failed to retrieve available kernel versions.
SET needrestart/ui-query_pkgs atd, avahi-daemon, cron, cups, fail2ban, postfix, snmpd, ssh, sysv init
<hangs>
=== cut ===
I push enter, I restart getting perl warnings:
=== cut ===
Use of uninitialized value $rc in numeric ne (!=) at /usr/share/perl5/NeedRestart/UI/Debconf.pm line 46, <STDIN> line 4.
SUBST needrestart/ui-query_pkgs OUT Services to be restarted:
Use of uninitialized value $rc in numeric ne (!=) at /usr/share/perl5/NeedRestart/UI/Debconf.pm line 46, <STDIN> line 5.
SUBST needrestart/ui-query_pkgs PKGS atd, avahi-daemon, cron, cups, fail2ban, postfix, snmpd, ssh, sysv init
=== cut ===
dpkg-reconfigure debconf works fine, so I think my debconf has no problems.
--