+}
+
+add_neurodebian_popcon_161() {
+ # 1.60 introduced encryption and a way to provide multiple keys to
+ # encrypt submissions to multiple servers.
+
+ # "Installation" is taken care of through installing files under
+ # /etc/popularity-contest.d, so no additional actions necessary here
+ :
+}
+
+popcon_version=$(dpkg -l popularity-contest | tail -n 1 | awk '{print $3;}')
+
+if [ "$1" = "configure" -o "$1" = "abort-upgrade" ]; then
+ if dpkg --compare-versions $popcon_version lt 1.61; then
+ add_neurodebian_popcon_pre161
+ else
+ # Assure that we have no "old" settings for submission
+ remove_neurodebian_popcon_pre161 || :
+ fi