/[smecontribs]/rpms/mailman/contribs10/mailman-2.1.12-rmlist.patch
ViewVC logotype

Annotation of /rpms/mailman/contribs10/mailman-2.1.12-rmlist.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Mon Feb 22 15:33:53 2021 UTC (3 years, 9 months ago) by brianr
Branch: MAIN
CVS Tags: HEAD
Initial import

1 brianr 1.1 diff --git a/bin/rmlist b/bin/rmlist
2     index 8b58a3c..b31141e 100755
3     --- a/bin/rmlist
4     +++ b/bin/rmlist
5     @@ -37,6 +37,7 @@ Where:
6     """
7    
8     import os
9     +import re
10     import sys
11     import getopt
12     import shutil
13     @@ -121,7 +122,7 @@ def main():
14     sys.modules[modname].remove(mlist)
15    
16     REMOVABLES = [
17     - (os.path.join('lists', listname), C_('list info')),
18     + (os.path.join(mm_cfg.LIST_DATA_DIR, listname), C_('list info')),
19     ]
20    
21     # Remove any stale locks associated with the list
22     @@ -131,20 +132,27 @@ def main():
23     REMOVABLES.append((os.path.join(mm_cfg.LOCK_DIR, filename),
24     C_('stale lock file')))
25    
26     + # Remove any held messages for this list
27     + for filename in os.listdir(mm_cfg.DATA_DIR):
28     + cre = re.compile('^heldmsg-%s-\d+\.(pck|txt)$' % listname,
29     + re.IGNORECASE)
30     + if cre.match(filename):
31     + REMOVABLES.append((os.path.join(mm_cfg.DATA_DIR, filename),
32     + C_('held message file')))
33     +
34     if removeArchives:
35     REMOVABLES.extend([
36     - (os.path.join('archives', 'private', listname),
37     + (os.path.join(mm_cfg.PRIVATE_ARCHIVE_FILE_DIR, listname),
38     C_('private archives')),
39     - (os.path.join('archives', 'private', listname + '.mbox'),
40     + (os.path.join(mm_cfg.PRIVATE_ARCHIVE_FILE_DIR, listname + '.mbox'),
41     C_('private archives')),
42     - (os.path.join('archives', 'public', listname),
43     + (os.path.join(mm_cfg.PUBLIC_ARCHIVE_FILE_DIR, listname),
44     C_('public archives')),
45     - (os.path.join('archives', 'public', listname + '.mbox'),
46     + (os.path.join(mm_cfg.PUBLIC_ARCHIVE_FILE_DIR, listname + '.mbox'),
47     C_('public archives')),
48     ])
49    
50     - for dirtmpl, msg in REMOVABLES:
51     - dir = os.path.join(mm_cfg.VAR_PREFIX, dirtmpl)
52     + for dir, msg in REMOVABLES:
53     remove_it(listname, dir, msg)
54    
55    

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed