[Pkg-mailman-hackers] Pkg-mailman commit - rev 622 - in trunk/debian: . patches

Thijs Kinkhorst thijs at alioth.debian.org
Sat Mar 21 19:14:23 UTC 2009


Author: thijs
Date: 2009-03-21 19:14:23 +0000 (Sat, 21 Mar 2009)
New Revision: 622

Removed:
   trunk/debian/mailman.install
   trunk/debian/patches/02_HyperDatabase_mapkeys.patch
   trunk/debian/unicodify_archives.py
Modified:
   trunk/debian/changelog
   trunk/debian/patches/series
   trunk/debian/rules
Log:
Remove obsolete unicodify_archives for upgrading sarge->etch.

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2009-03-21 19:11:09 UTC (rev 621)
+++ trunk/debian/changelog	2009-03-21 19:14:23 UTC (rev 622)
@@ -6,8 +6,9 @@
   [ Thijs Kinkhorst ]
   * Apply patch from Tanguy Ortolo updating postfix-to-mailman
     instructions to avoid backscatter mail (Closes: #520040).
+  * Remove obsolete unicodify_archives for upgrading sarge->etch.
 
- -- Thijs Kinkhorst <thijs at debian.org>  Sat, 21 Mar 2009 20:10:13 +0100
+ -- Thijs Kinkhorst <thijs at debian.org>  Sat, 21 Mar 2009 20:13:55 +0100
 
 mailman (1:2.1.12-1) unstable; urgency=low
 

Deleted: trunk/debian/mailman.install
===================================================================
--- trunk/debian/mailman.install	2009-03-21 19:11:09 UTC (rev 621)
+++ trunk/debian/mailman.install	2009-03-21 19:14:23 UTC (rev 622)
@@ -1 +0,0 @@
-debian/unicodify_archives.py var/lib/mailman/bin/

Deleted: trunk/debian/patches/02_HyperDatabase_mapkeys.patch
===================================================================
--- trunk/debian/patches/02_HyperDatabase_mapkeys.patch	2009-03-21 19:11:09 UTC (rev 621)
+++ trunk/debian/patches/02_HyperDatabase_mapkeys.patch	2009-03-21 19:14:23 UTC (rev 622)
@@ -1,72 +0,0 @@
-Patch: 02_HyperDatabase_mapkeys.patch
-Author: Lionel Elie Mamane <lmamane at debian.org>
-Added to support unicodify_archives (Closes: #412142)
-Index: mailman-2.1.12/Mailman/Archiver/HyperDatabase.py
-===================================================================
---- mailman-2.1.12.orig/Mailman/Archiver/HyperDatabase.py	2009-03-02 20:41:56.000000000 +0100
-+++ mailman-2.1.12/Mailman/Archiver/HyperDatabase.py	2009-03-02 20:49:56.000000000 +0100
-@@ -54,7 +54,7 @@
-     SortedDictionary.
-     """
- 
--    def __init__(self, path):
-+    def __init__(self, path, sort = True):
-         self.current_index = 0
-         self.path = path
-         self.lockfile = LockFile.LockFile(self.path + ".lock")
-@@ -62,7 +62,7 @@
-         self.__dirty = 0
-         self.dict = {}
-         self.sorted = []
--        self.load()
-+        self.load(sort)
- 
-     def __repr__(self):
-         return "DumbBTree(%s)" % self.path
-@@ -163,7 +163,7 @@
-     def __len__(self):
-         return len(self.sorted)
- 
--    def load(self):
-+    def load(self, sort):
-         try:
-             fp = open(self.path)
-             try:
-@@ -176,7 +176,7 @@
-         except EOFError:
-             pass
-         else:
--            self.__sort(dirty=1)
-+            if sort: self.__sort(dirty=1)
- 
-     def close(self):
-         omask = os.umask(007)
-@@ -234,7 +234,7 @@
-         self.__openIndices(archive)
-         self.__super_addArticle(archive, article, subject, author, date)
- 
--    def __openIndices(self, archive):
-+    def __openIndices(self, archive, sort = True):
-         if self.__currentOpenArchive == archive:
-             return
-         self.__closeIndices()
-@@ -248,7 +248,7 @@
-         finally:
-             os.umask(omask)
-         for i in ('date', 'author', 'subject', 'article', 'thread'):
--            t = DumbBTree(os.path.join(arcdir, archive + '-' + i))
-+            t = DumbBTree(os.path.join(arcdir, archive + '-' + i), sort)
-             setattr(self, i + 'Index', t)
-         self.__currentOpenArchive = archive
- 
-@@ -336,3 +336,10 @@
-             try:
-                 key, msgid=self.threadIndex.next()
-             except KeyError: finished=1
-+
-+    def mapKeys(self, f, archive, index):
-+        self.__openIndices(archive, False)
-+        index = getattr(self, index + 'Index')
-+        d = index.dict
-+        index.dict = dict(zip(map(f, d.keys()), d.values()))
-+        index.__dirty = 1

Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series	2009-03-21 19:11:09 UTC (rev 621)
+++ trunk/debian/patches/series	2009-03-21 19:14:23 UTC (rev 622)
@@ -1,5 +1,4 @@
 01_defaults.debian.patch
-02_HyperDatabase_mapkeys.patch
 07_snooze.patch
 10_wrapper_uid.patch
 15_mailmanctl_daemonize.patch

Modified: trunk/debian/rules
===================================================================
--- trunk/debian/rules	2009-03-21 19:11:09 UTC (rev 621)
+++ trunk/debian/rules	2009-03-21 19:14:23 UTC (rev 622)
@@ -61,7 +61,6 @@
 binary-arch:	build
 	dh_testdir
 	dh_testroot
-	chmod +x debian/unicodify_archives.py
 	dh_install
 	dh_installdirs
 	dh_installdocs ACKNOWLEDGMENTS README* TODO FAQ

Deleted: trunk/debian/unicodify_archives.py
===================================================================
--- trunk/debian/unicodify_archives.py	2009-03-21 19:11:09 UTC (rev 621)
+++ trunk/debian/unicodify_archives.py	2009-03-21 19:14:23 UTC (rev 622)
@@ -1,65 +0,0 @@
-#! /usr/bin/python
-#
-# Copyright (C) 2007 Lionel Elie Mamane <lmamane at debian.org>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-# 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software 
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-"""Convert a list's archive databases to unicode where appropriate
-
-This script is intended to be run as a bin/withlist script, i.e.
-
-% bin/withlist -l -r unicodify_archives <mylist>
-"""
-
-import paths
-import time
-from Mailman.i18n import _
-from Mailman import mm_cfg
-
-def unicodify_string(s):
-    if isinstance(s,unicode):
-        return s
-    elif isinstance(s,str):
-        try:
-            return s.decode()
-        except UnicodeDecodeError:
-            pass
-        try:
-            return s.decode('utf-8')
-        except UnicodeDecodeError:
-            pass
-        return s.decode('windows-1252', 'replace')
-
-def unicodify_fst(t):
-    l = list(t[1:])
-    l.insert(0, unicodify_string(t[0]))
-    return tuple(l)
-
-def unicodify_archives(mlist):
-    # Only act if we are using the internal archiver
-    if mm_cfg.PUBLIC_EXTERNAL_ARCHIVER:
-        return
-    else:
-        from Mailman.Archiver import HyperArch
-        h = HyperArch.HyperArchive(mlist)
-        for archive in h.archives:
-            for hdr in ('subject', 'author'):
-                h.database.mapKeys(unicodify_fst, archive, hdr)
-        h.close()
-
-
-
-if __name__ == '__main__':
-    print _(__doc__.replace('%', '%%'))




More information about the Pkg-mailman-hackers mailing list