diff --git a/debian/postinst b/debian/postinst index 6097f1a..98444d2 100644 --- a/debian/postinst +++ b/debian/postinst @@ -126,14 +126,16 @@ case "$1" in fi fi - old_score_location=/var/cache/pmg-scores.cf - new_score_location=/etc/mail/spamassassin/pmg-scores.cf.new - if test -e "$old_score_location"; then - if ! test -e "$new_score_location"; then - echo "moving $old_score_location to $new_score_location" - mv "$old_score_location" "$new_score_location" - else - echo "both $old_score_location and $new_score_location exist - please review manually" + if test -n "$2" && dpkg --compare-versions "$2" 'lt' '8.2.0'; then + old_score_location=/var/cache/pmg-scores.cf + new_score_location=/etc/mail/spamassassin/pmg-scores.cf.new + if test -e "$old_score_location"; then + if ! test -e "$new_score_location"; then + echo "moving $old_score_location to $new_score_location" + mv "$old_score_location" "$new_score_location" + else + echo "both $old_score_location and $new_score_location exist - please review manually" + fi fi fi ;;