[Pkg-privacy-commits] [vidalia] 81/160: Removing deprecated files from etc/default/tor.vidalia

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 13:14:33 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository vidalia.

commit b8cd0e0c1d0f17cc99afd2f114a7528b79367245
Author: Dererk <dererk at debian.org>
Date:   Thu Sep 22 18:21:33 2011 -0300

    Removing deprecated files from etc/default/tor.vidalia
---
 debian/changelog |  2 ++
 debian/postinst  | 29 +++++++++++++++++++++--------
 2 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 30281bd..a6fce2f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 vidalia (0.2.14-3) unstable; urgency=low
 
   * Moved debconf actions from config to postinst script (Closes: #641044).
+  * Remove deprecated files that enforced Tor not to start after having
+    chosen to do so. This comes from the older approach to control Tor.
   * Added debconf templates translations:
     - French, thanks Christian Perrier (Closes: #640769).
     - German, thanks Martin.E.Schauer (Closes: #641920).
diff --git a/debian/postinst b/debian/postinst
index 403c1e1..94a6349 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -4,16 +4,29 @@ if [ -f /usr/share/debconf/confmodule ]; then
 	. /usr/share/debconf/confmodule
 fi
 
-if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then
 
-	db_get vidalia/users 
-	users=$(echo $RET | sed -e 's@,@@g')
+case "$1" in
+  configure|reconfigure)
+    # We don't go under this approach since Vidalia 0.2.14-3,
+    #  so we need to nicely remove deprecated files
+    if dpkg --compare-versions "$2" lt-nl "0.2.14-3"; then
+            if [ -f /etc/default/tor.vidalia ]; then
+                rm -f /etc/default/tor.vidalia
+                if [ -x "/usr/bin/ucf" ]; then
+                    ucf --purge /etc/default/tor.vidalia
+                fi
+            fi
+    fi
+    
+     db_get vidalia/users
+     users=$(echo $RET | sed -e 's@,@@g')
 
-	# Add selected users
-	for u in $users; do
-		adduser --quiet $u debian-tor
-	done
+     # Add selected users
+     for u in $users; do
+        adduser --quiet $u debian-tor
+     done
+  ;;
+esac
 
-fi
 
 #DEBHELPER#

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/vidalia.git



More information about the Pkg-privacy-commits mailing list