[Pkg-privacy-commits] [vidalia] 80/160: Moved debconf actions from config to postinst script and include German debconf template translation

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 4ab2f0c21330d42d430013ab622bba69b774aded
Author: Dererk <dererk at debian.org>
Date:   Wed Sep 21 16:55:09 2011 -0300

    Moved debconf actions from config to postinst script and include German
    debconf template translation
---
 debian/changelog |  9 +++++++++
 debian/config    | 49 ++++++++++++++++++++-----------------------------
 debian/po/de.po  | 10 ++++++----
 debian/postinst  | 12 ++++++++++++
 4 files changed, 47 insertions(+), 33 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 960d992..30281bd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+vidalia (0.2.14-3) unstable; urgency=low
+
+  * Moved debconf actions from config to postinst script (Closes: #641044).
+  * Added debconf templates translations:
+    - French, thanks Christian Perrier (Closes: #640769).
+    - German, thanks Martin.E.Schauer (Closes: #641920).
+
+ -- Ulises Vitulli <dererk at debian.org>  Mon, 19 Sep 2011 12:05:30 -0300
+
 vidalia (0.2.14-2) unstable; urgency=low
 
   * The 'Napoleon-Of-Crime' dupload.
diff --git a/debian/config b/debian/config
index da17020..9407eb6 100644
--- a/debian/config
+++ b/debian/config
@@ -5,35 +5,26 @@ if [ -f /usr/share/debconf/confmodule ]; then
         . /usr/share/debconf/confmodule
 fi
 
-## Addopt Wicd-Netdev interaction approach.
-# Fix upgrades from broken experimental version
-db_get vidalia/users
-if [ -n "$( echo $RET | grep \${ )" ]; then
-	db_set vidalia/users ""
-	db_fset vidalia/users seen false
+## Addopt wicd-netdev interaction approach.
+if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then
+
+	# Get regular/non-system users
+	users="$(getent passwd | awk -F: '{if ($3 >= 1000 && $3 < 60000) print $1}' | sort | tr '\n' ',' | sed 's@,@, @g;s@, $@@g')"
+
+	# Get a list of users into 'debian-tor' group
+	debiantor=$(getent group debian-tor | cut -d: -f4 | sed -e 's@,@ @g')
+
+	# Don't show users already in debian-tor
+	for u in $debiantor; do
+		users=$(echo $users | sed "s@$u, @@g;s@, $u\$@@g;s@^$u\$@@g");
+	done
+
+	# Substract already present users
+	db_subst vidalia/users users "$users"
+	if [ "$users" != "" ]; then
+		db_input high vidalia/users || true
+		db_go
+	fi
 fi
 
-db_metaget vidalia/users users
-users="$(getent passwd | awk -F: '{if ($3 >= 1000 && $3 < 60000) print $1}' | sort | tr '\n' ',' | sed 's@,@, @g;s@, $@@g')"
-debiantor=$(getent group debian-tor | cut -d: -f4 | sed -e 's@,@ @g')
-
-# Don't show users already in debian-tor
-for u in $debiantor; do
-	users=$(echo $users | sed "s@$u, @@g;s@, $u\$@@g;s@^$u\$@@g");
-done
-
-db_subst vidalia/users users "$users"
-
-db_input high vidalia/users || true
-db_go
-
-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
-
-
 #DEBHELPER#
diff --git a/debian/po/de.po b/debian/po/de.po
index de8496b..18ad741 100644
--- a/debian/po/de.po
+++ b/debian/po/de.po
@@ -1,14 +1,14 @@
 # Translation of vidalia debconf templates to German
 # Copyright (C) Helge Kreutzmann <debian at helgefjell.de>, 2008.
-# Copyright (C) Martin Eberhard Schauer <Martin.E.Schauer at gmx.de>, 2010.
+# Copyright (C) Martin Eberhard Schauer <Martin.E.Schauer at gmx.de>, 2010, 2011.
 # This file is distributed under the same license as the vidalia package.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: vidalia 0.2.10-2\n"
+"Project-Id-Version: vidalia 0.2.14-2\n"
 "Report-Msgid-Bugs-To: vidalia at packages.debian.org\n"
 "POT-Creation-Date: 2011-06-23 13:03-0300\n"
-"PO-Revision-Date: 2010-10-04 19:47+0200\n"
+"PO-Revision-Date: 2011-06-23 19:20+0200\n"
 "Last-Translator: Martin Eberhard Schauer <Martin.E.Schauer at gmx.de>\n"
 "Language-Team: German <debian-l10n-german at lists.debian.org>\n"
 "Language: \n"
@@ -21,7 +21,7 @@ msgstr ""
 #. Description
 #: ../templates:1001
 msgid "Users to add to the debian-tor group:"
-msgstr ""
+msgstr "Benutzer, die Mitglied der Gruppe debian-tor werden sollen:"
 
 #. Type: multiselect
 #. Description
@@ -30,3 +30,5 @@ msgid ""
 "Users who should be able to control Tor daemon need to be added to the group "
 "\"debian-tor\"."
 msgstr ""
+"Benutzer, die den Tor-Daemon steuern dürfen, müssen Mitglieder der Gruppe "
+"»debian-tor« werden."
diff --git a/debian/postinst b/debian/postinst
index c369c73..403c1e1 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -4,4 +4,16 @@ 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')
+
+	# Add selected users
+	for u in $users; do
+		adduser --quiet $u debian-tor
+	done
+
+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