diff options
author | Mark Sapiro <mark@msapiro.net> | 2008-04-28 10:59:50 -0700 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2008-04-28 10:59:50 -0700 |
commit | 8f2ad9d29ddf901a04289b834be3f592fcd62a7e (patch) | |
tree | 14d0b11a11638b308a1c8b5b170c013e2b8f7a74 | |
parent | 35fa6d25927fd941bb270fa42cde0e570606ad21 (diff) | |
download | mailman2-8f2ad9d29ddf901a04289b834be3f592fcd62a7e.tar.gz mailman2-8f2ad9d29ddf901a04289b834be3f592fcd62a7e.tar.xz mailman2-8f2ad9d29ddf901a04289b834be3f592fcd62a7e.zip |
Fixed a problem with bin/update erroneously moving templates from
templates/xx to lists/xx if a list has the same name as a language
code. Also fixed the absolute path to lists/ (1418670 ).
-rw-r--r-- | NEWS | 16 | ||||
-rwxr-xr-x | bin/update | 42 |
2 files changed, 40 insertions, 18 deletions
@@ -4,6 +4,22 @@ Copyright (C) 1998-2008 by the Free Software Foundation, Inc. Here is a history of user visible changes to Mailman. +2.x.xx (xx-xxx-xxxx) + + Bug fixes and other patches + + - Changed the preservation of unparseable messages to be conditional on + the Defaults.py/mm_cfg.py setting of QRUNNER_SAVE_BAD_MESSAGES and + changed the queue directory in which messages are preserved from 'shunt' + to 'bad'. + + - Fixed a bug introduced in 2.1.10 that caused some email subscribe + requests to be shunted. + + - Fixed a problem with bin/update erroneously moving templates from + templates/xx to lists/xx if a list has the same name as a language + code. Also fixed the absolute path to lists/ (1418670 ). + 2.1.10 (21-Apr-2008) Security @@ -1,6 +1,6 @@ -#! @PYTHON@ +#! /usr/bin/python # -# Copyright (C) 1998-2005 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2008 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 @@ -342,25 +342,31 @@ script. # and move them to the new place if there's not already # a new one there # - tmpl_dir = os.path.join(mm_cfg.PREFIX, "templates") - list_dir = os.path.join(mm_cfg.PREFIX, "lists") - b4_tmpl_dir = os.path.join(tmpl_dir, mlist._internal_name) - new_tmpl_dir = os.path.join(list_dir, mlist._internal_name) - if os.path.exists(b4_tmpl_dir): - print _("""\ + # There is a problem with the following if the list name is equal + # to a language code. All the templates get moved from templates/xx + # to lists/xx. To avoid this, test the list name, and if it is 'en' + # or matches a name in the messages directory, just skip this step. + if (mlist._internal_name <> 'en' and mlist._internal_name not in + os.listdir(mm_cfg.MESSAGES_DIR)): + tmpl_dir = os.path.join(mm_cfg.PREFIX, "templates") + list_dir = mm_cfg.LIST_DATA_DIR + b4_tmpl_dir = os.path.join(tmpl_dir, mlist._internal_name) + new_tmpl_dir = os.path.join(list_dir, mlist._internal_name) + if os.path.exists(b4_tmpl_dir): + print _("""\ - This list looks like it might have <= b4 list templates around""") - for f in os.listdir(b4_tmpl_dir): - o_tmpl = os.path.join(b4_tmpl_dir, f) - n_tmpl = os.path.join(new_tmpl_dir, f) - if os.path.exists(o_tmpl): - if not os.path.exists(n_tmpl): - os.rename(o_tmpl, n_tmpl) - print _('- moved %(o_tmpl)s to %(n_tmpl)s') + for f in os.listdir(b4_tmpl_dir): + o_tmpl = os.path.join(b4_tmpl_dir, f) + n_tmpl = os.path.join(new_tmpl_dir, f) + if os.path.exists(o_tmpl): + if not os.path.exists(n_tmpl): + os.rename(o_tmpl, n_tmpl) + print _('- moved %(o_tmpl)s to %(n_tmpl)s') + else: + print _("""\ +- both %(o_tmpl)s and %(n_tmpl)s exist, leaving untouched""") else: print _("""\ -- both %(o_tmpl)s and %(n_tmpl)s exist, leaving untouched""") - else: - print _("""\ - %(o_tmpl)s doesn't exist, leaving untouched""") # # Move all the templates to the en language subdirectory as required for |