]> git.donarmstrong.com Git - neurodebian.git/commitdiff
popcon: cleanup **only** when upgrading from older version of the neurodebian-popcon
authorYaroslav Halchenko <debian@onerussian.com>
Wed, 13 Aug 2014 17:58:09 +0000 (13:58 -0400)
committerYaroslav Halchenko <debian@onerussian.com>
Wed, 13 Aug 2014 17:58:09 +0000 (13:58 -0400)
debian/TODO
debian/changelog
debian/neurodebian-popularity-contest.postinst
debian/neurodebian-popularity-contest.postrm [deleted file]

index 43b52322d421a0a5a8c7968896576954bb44a54c..7be31271de66c2166afb7e65627752db53339573 100644 (file)
@@ -54,5 +54,3 @@ echo "I: success"
 
 * add backport patch for wheezy for neurodebian-guest-additions to pre-depend on update-manager-gnome
 
-* popcon: cleanup **only** when upgrading from older version of the neurodebian-popcon
-
index 3aaa6b9f6c7194cc3d850d1a1c00f741bcf4ae99..105d4f4764e5c2b90054623aea921ea3636d4128 100644 (file)
@@ -8,6 +8,11 @@ neurodebian (0.34) unstable; urgency=medium
       into Depends (from Pre-Depends), and stripping deprecated -ose suffix
     - fixing package names for chromium, and removing update-manager-gnome
       N/A in sid
+  * debian/neurodebian-popularity-contest.*
+    - .postinst  should try to remove old-fashion popcon entry only if
+      upgrading/configuring from pre 0.33 version of neurodebian-*
+    - .postrm  removed altogether since will not longer be needed because
+      popcon configuration gets installed as a config file now
   * tools/nd-configurerepo
     - use long GPG key id
     - unify prefix for environment variables to be NEURODEBIAN_ instead of
index fb003d5226173167bc58a3de22a2789ceeeb9739..4f6c57263a03e600f6a9b2bc07225d46a4e335e6 100755 (executable)
@@ -48,8 +48,11 @@ 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 || :
+               # Assure that we have no "old" settings for submission if
+               # previous version of our package was old
+               if [ "$1" = "configure" ] && [ -z "$2" ] && dpkg --compare-versions "$2" lt 0.33; then
+                       remove_neurodebian_popcon_pre161 || :
+               fi
        fi
 fi
 
diff --git a/debian/neurodebian-popularity-contest.postrm b/debian/neurodebian-popularity-contest.postrm
deleted file mode 100755 (executable)
index 92bb35d..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh -e
-
-#DEBHELPER#
-
-popcon_conf=/etc/popularity-contest.conf
-nd_popcon_conf=/etc/popularity-contest.d/neurodebian.conf
-remove_neurodebian_popcon_pre161() {
-       # Adjust popularity-contest.conf
-       if [ -e "$popcon_conf" ] \
-          && grep -q "http://neuro.debian.net/cgi-bin/popcon-submit.cgi" $popcon_conf; then
-               echo "Removing NeuroDebian url for Popularity Contest submissions."
-               # First remove any explicit mentioning and then empty additions
-               sed -i -e 's,http://neuro.debian.net/cgi-bin/popcon-submit.cgi,,g' \
-                          -e '/SUBMITURLS+=" *"/d' \
-                          -e '/SUBMITURLS="$SUBMITURLS *"/d' \
-                       "$popcon_conf"
-       fi
-}
-
-# If requested to be purged -- remove our entry
-if [ "$1" = "purge" ]; then
-       remove_neurodebian_popcon_pre161
-fi