diff options
| author | bwarsaw | 2001-08-15 21:30:26 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-08-15 21:30:26 +0000 |
| commit | a18b40b6fded35953f3693b4b079b780a1bba3e0 (patch) | |
| tree | c94d33f0ff76da56527722d459972e7f40d4ebd2 | |
| parent | f3135486cef6b2357799be9397f780dd1098bf4c (diff) | |
| download | mailman-a18b40b6fded35953f3693b4b079b780a1bba3e0.tar.gz mailman-a18b40b6fded35953f3693b4b079b780a1bba3e0.tar.zst mailman-a18b40b6fded35953f3693b4b079b780a1bba3e0.zip | |
| -rwxr-xr-x | bin/update | 23 |
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 # :( |
