[Mailman-Users] Poking and prodding the archiver

Phil Stracchino alaric at babcom.com
Mon Jul 9 04:59:56 CEST 2001


I've looked at some length through the code for the archiver now, and
although I still don't understand python, I've figured out enough of what
the archiver is doing to see that it's apparently intentional that the
path to mbox archives is .../mailman/archives/private/list.mbox/list.mbox.

What I haven't been able to figure out is *why* the code is written to
duplicate the last element in the pathname; nor why it is that the
archiver is written in such a way that it attempts to access this mbox
archive directory with its duplicated final pathname element even when
mbox archives are disabled, and fails if it doesn't exist.  I find this
behavior even more curious in light of the fact that newlist apparently
creates archives/private/list.mbox when it sets up the list, but does not
create the archives/private/list.mbox/list.mbox without the existence of
which the archiver fails.


I've applied the following patch to my HyperArch.py file (patch also
attached separately):


--- HyperArch.py.orig	Thu May 17 18:52:28 2001
+++ HyperArch.py	Sun Jul  8 19:42:20 2001
@@ -641,11 +641,10 @@
 
     def html_TOC(self):
         listname = self.maillist.internal_name()
-        mbox = os.path.join(self.maillist.archive_directory+'.mbox',
-                            listname+'.mbox')
+        mbox = os.path.join(self.maillist.archive_directory+'.mbox')
         d = {"listname": self.maillist.real_name,
              "listinfo": self.maillist.GetScriptURL('listinfo', absolute=1),
-             "fullarch": '../%s.mbox/%s.mbox' % (listname, listname),
+             "fullarch": '../%s.mbox' % (listname),
              "size": sizeof(mbox),
              }
         if not self.archives:


I don't know what impact this has on mbox archives, but for me, it makes
the HTML archiver work.


I would welcome comment, any explanations for the curious state of
unsatisfied and illogical dependencies described above, and any advice on
fixing anything that this patch breaks.  It's still a mystery to me why
the archiver should even *care* whether or not the mbox archive directory
exists, when mbox archives are disabled in the master configuration
anyway.


-- 
 Linux Now!   ..........Because friends don't let friends use Microsoft.
 phil stracchino   --   the renaissance man   --   mystic zen biker geek
        alaric at babcom.com                halmayne at sourceforge.net
   2000 CBR929RR, 1991 VFR750F3 (foully murdered), 1986 VF500F (sold)
-------------- next part --------------
--- HyperArch.py.orig	Thu May 17 18:52:28 2001
+++ HyperArch.py	Sun Jul  8 19:42:20 2001
@@ -641,11 +641,10 @@
 
     def html_TOC(self):
         listname = self.maillist.internal_name()
-        mbox = os.path.join(self.maillist.archive_directory+'.mbox',
-                            listname+'.mbox')
+        mbox = os.path.join(self.maillist.archive_directory+'.mbox')
         d = {"listname": self.maillist.real_name,
              "listinfo": self.maillist.GetScriptURL('listinfo', absolute=1),
-             "fullarch": '../%s.mbox/%s.mbox' % (listname, listname),
+             "fullarch": '../%s.mbox' % (listname),
              "size": sizeof(mbox),
              }
         if not self.archives:


More information about the Mailman-Users mailing list