summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/update23
1 files changed, 23 insertions, 0 deletions
diff --git a/bin/update b/bin/update
index f1ddbb178..3652b3bd7 100755
--- a/bin/update
+++ b/bin/update
@@ -35,6 +35,7 @@ some previous version. It knows about versions back to 1.0b4 (?).
import sys
import os
+import time
import marshal
import errno
import md5
@@ -365,6 +366,23 @@ def remove_old_sources(module):
print _("couldn't remove old file %(pyc)s -- %(rest)s")
+def update_qfiles():
+ print _('updating old qfiles')
+ prefix = `time.time()` + '+'
+ for file in os.listdir(mm_cfg.QUEUE_DIR):
+ # Updating means just moving the .db and .msg files to qfiles/in where
+ # it should be dequeued, converted, and processed normally.
+ if file.endswith('.msg'):
+ oldmsgfile = os.path.join(mm_cfg.QUEUE_DIR, file)
+ newmsgfile = os.path.join(mm_cfg.INQUEUE_DIR, prefix + file)
+ os.rename(oldmsgfile, newmsgfile)
+ elif file.endswith('.db'):
+ olddbfile = os.path.join(mm_cfg.QUEUE_DIR, file)
+ newdbfile = os.path.join(mm_cfg.INQUEUE_DIR, prefix + file)
+ os.rename(olddbfile, newdbfile)
+
+
+
def main():
errors = 0
# get rid of old stuff
@@ -436,6 +454,11 @@ If your archives are big, this could take a minute or two...""")
fp.close()
os.unlink(oldpendingfile)
#
+ # In Mailman 2.1, the qfiles directory has a different structure and a
+ # different content.
+ #
+ update_qfiles()
+ #
# This warning was necessary for the upgrade from 1.0b9 to 1.0b10.
# There's no good way of figuring this out for releases prior to 2.0beta2
# :(