[Mailman-Developers] Weird things happen after upgrade to 2.1a3+ CVS :-(
Barry A. Warsaw
Mon, 22 Oct 2001 15:20:05 -0400
>>>>> "LM" == Luca Maranzano <firstname.lastname@example.org> writes:
LM> just after upgrading to 2.1a3+ (latest CVS) it seems that
LM> nothing is working any more. Python 2.0.1, email-0.93.
LM> Here is an error message from gate_news and accessing to the
LM> Web U/I works only for one list! I'll send the error log in
LM> another message.
Darn, Dan Mick discovered the same problem triggered from
senddigests. The problem is both scripts open the list unlocked, and
that breaks auto-upgrade of the schemas. Attached is the patch I sent
Dan, and I /thought/ I checked in, but now see I didn't.
I will now though. Can you give it a try?
LM> Why make update said "nothing to do"? Are the config.pck files
LM> changed after the modifications to the moderation process? Do
LM> I have to convert them in some way?
No, you don't have to do anything. Mailman should read both config.db
and config.pck and always write config.pck, so it should automatically
convert the first time it loads the list in a locked state. Hitting
its web page or sending it an email should be all it takes. Or even
running senddigest or gate_news the first time -- after application of
-------------------- snip snip --------------------
RCS file: /cvsroot/mailman/mailman/Mailman/MailList.py,v
retrieving revision 2.45
diff -u -r2.45 MailList.py
--- MailList.py 2001/10/21 06:32:36 2.45
+++ MailList.py 2001/10/22 19:18:57
@@ -535,18 +535,25 @@
# Sanity checks
def CheckVersion(self, stored_state):
- """Migrate prior version's state to new structure, if changed."""
- if (self.data_version >= mm_cfg.DATA_FILE_VERSION and
- type(self.data_version) == type(mm_cfg.DATA_FILE_VERSION)):
+ """Auto-update schema if necessary."""
+ if self.data_version >= mm_cfg.DATA_FILE_VERSION:
- self.InitVars() # Init any new variables,
- self.Load(check_version = 0) # then reload the file
- from versions import Update
- Update(self, stored_state)
- self.data_version = mm_cfg.DATA_FILE_VERSION
- if self.Locked():
+ # Initialize any new variables
+ # Then reload the database (but don't recurse)
+ # We must hold the list lock in order to update the schema
+ waslocked = self.Locked()
+ from versions import Update
+ Update(self, stored_state)
+ self.data_version = mm_cfg.DATA_FILE_VERSION
+ if not waslocked:
"""Normalize selected values to known formats."""