[evolvis-commits] r17563: [#2021] On upgrade to this version, forge-delete all users marked as deleted↵ (e.g. by the old univention sync script)

mirabilos at evolvis.org mirabilos at evolvis.org
Tue Sep 20 13:30:10 CEST 2011


Author: mirabilos
Date: 2011-09-20 13:30:09 +0200 (Tue, 20 Sep 2011)
New Revision: 17563

Modified:
   branches/ev48fixes/debian/changelog
   branches/ev48fixes/debian/evolvis.postinst
Log:
[#2021] On upgrade to this version, forge-delete all users marked as deleted
(e.g. by the old univention sync script)


Modified: branches/ev48fixes/debian/changelog
===================================================================
--- branches/ev48fixes/debian/changelog	2011-09-20 11:22:30 UTC (rev 17562)
+++ branches/ev48fixes/debian/changelog	2011-09-20 11:30:09 UTC (rev 17563)
@@ -6,11 +6,12 @@
   * Ensure minimum or exact version matches for Evolvis metapackage
   * [#2021] Use /usr/share/gforge/bin/user-del.php for Univention slaving
   * gf-common Depends on sudo (for some of the scripts)
+  * [#2021] On upgrade to this version, forge-delete all deleted users
 
   [ Patrick Apel ]
   * Fix XHTML validity in the German translation
 
- -- Thorsten Glaser <t.glaser at tarent.de>  Tue, 20 Sep 2011 13:22:01 +0200
+ -- Thorsten Glaser <t.glaser at tarent.de>  Tue, 20 Sep 2011 13:28:58 +0200
 
 gforge (4.8.3+evolvis36+fixes2) unstable; urgency=low
 

Modified: branches/ev48fixes/debian/evolvis.postinst
===================================================================
--- branches/ev48fixes/debian/evolvis.postinst	2011-09-20 11:22:30 UTC (rev 17562)
+++ branches/ev48fixes/debian/evolvis.postinst	2011-09-20 11:30:09 UTC (rev 17563)
@@ -37,7 +37,14 @@
 	if test -e /usr/share/gforge/evolvis-flag.36f3; then
 		# delete all users already marked as deleted
 		# to get the database into a consistent state
-…
+		echo "+++ trying to forge-delete all deleted users"
+		for uname in $(sudo -u postgres psql -d gforge -A -P t -c \
+		    'SELECT user_name FROM users WHERE status='\''D'\'';'); do
+			/usr/share/gforge/bin/user-del.php "$uname" "$uname"
+		done
+		echo "=== done"
+		rm -f /usr/share/gforge/evolvis-flag.36f3
+	fi
 
 	# auto-enable some MediaWiki extensions
 	if which mwenext >/dev/null 2>&1; then



More information about the evolvis-commits mailing list