Mark Sapiro wrote:

>Brian Wilson wrote:
>>
>>There are a few things I noticed on my install today (Debian w/ Postfix).  
>>
>>1) rmlist doesnt work properly:


Fixed by the attached patch.


>>2) Web locations are off...
>>
>>If i go to archives for a list: 
>>http://lists.example.com/pipermail/lists.example.com/test/, the html link 
>>that links to listinfo uses DEFAULT_URL_HOST instead of the urlhost for the 
>>list I'm on (link goes to http://DEFAULT_URL_HOST/mailman/listinfo/test).


I'm not going to fix this. The problem occurs because the
MailList.MailList.Create() method initializes web_page_url with
DEFAULT_URL_HOST. It then calls the archiver to initialize the
archives, and only after returning to the caller (bin/newlist or the
create CGI) is web_page_url updated with the correct host name.

It only affects the initial 'empty archive' page. the first post to the
list will regenerate all the archive pages and the listinfo link will
be correct.

Fixing this properly is way too much work for too little benefit.

I have published a Bazaar branch to lp:~msapiro/mailman/vhost
<https://code.launchpad.net/~msapiro/mailman/vhost> which contains all
the work I've done to date on this branch.

-- 
Mark Sapiro <[email protected]>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

=== modified file 'bin/rmlist'
--- bin/rmlist  2005-08-27 01:40:17 +0000
+++ bin/rmlist  2010-02-26 22:15:27 +0000
@@ -1,6 +1,6 @@
 #! @PYTHON@
 #
-# Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2010 by the Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -43,6 +43,7 @@
 
 import paths
 from Mailman import mm_cfg
+from Mailman import Site
 from Mailman import Utils
 from Mailman import MailList
 from Mailman.i18n import _
@@ -121,25 +122,24 @@
             sys.modules[modname].remove(mlist)
 
         REMOVABLES = [
-            (os.path.join('lists', listname), _('list info')),
+            (mlist.fullpath(), _('list info')),
             ]
 
     # Remove any stale locks associated with the list
     for filename in os.listdir(mm_cfg.LOCK_DIR):
-        fn_listname = filename.split('.')[0]
-        if fn_listname == listname:
+        if filename.startswith(listname + '.lock'):
             REMOVABLES.append((os.path.join(mm_cfg.LOCK_DIR, filename),
                                _('stale lock file')))
 
     if removeArchives:
         REMOVABLES.extend([
-            (os.path.join('archives', 'private', listname),
-             _('private archives')),
-            (os.path.join('archives', 'private', listname + '.mbox'),
-             _('private archives')),
-            (os.path.join('archives', 'public', listname),
+            (Site.get_archpath(listname),
+             _('private archives')),
+            (Site.get_archpath(listname) + '.mbox',
+             _('private archives')),
+            (Site.get_archpath(listname, public=True),
              _('public archives')),
-            (os.path.join('archives', 'public', listname + '.mbox'),
+            (Site.get_archpath(listname, public=True) + '.mbox',
              _('public archives')),
             ])
 

------------------------------------------------------
Mailman-Users mailing list [email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to