From d367b818564a55b316af471506a8e371f75520f8 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Fri, 17 Oct 2008 15:04:39 -0700 Subject: Added digest.mbox and pending.pck to the 'list' files checked by check_perms. Launchpad bug #284802. --- bin/check_perms | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/check_perms b/bin/check_perms index 7bba0f74..3c8d3768 100755 --- a/bin/check_perms +++ b/bin/check_perms @@ -1,6 +1,6 @@ #! @PYTHON@ # -# Copyright (C) 1998-2007 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 @@ -334,6 +334,7 @@ def checkdata(): checkfiles = ('config.pck', 'config.pck.last', 'config.db', 'config.db.last', 'next-digest', 'next-digest-topics', + 'digest.mbox', 'pending.pck', 'request.db', 'request.db.tmp') if STATE.VERBOSE: print _('checking permissions on list data') -- cgit v1.2.3 From e027fb3db061d92f285b0ba50031c0990008097a Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Fri, 17 Oct 2008 15:33:48 -0700 Subject: Changed bin/arch to attempt to open the mbox before wiping the old archive. Launchpad bug #280418. --- bin/arch | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/arch b/bin/arch index 40a75a0e..a98ae2af 100644 --- a/bin/arch +++ b/bin/arch @@ -1,6 +1,6 @@ #! @PYTHON@ # -# Copyright (C) 1998,1999,2000,2001,2002 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 @@ -161,6 +161,11 @@ def main(): # set the lock lifetime to 3 hours. XXX is this reasonable??? lock = LockFile(lockfile, lifetime=3*60*60) lock.lock() + # Try to open mbox before wiping old archive. + try: + fp = open(mbox) + except IOError, msg: + usage(3, _('Cannot open mbox file %(mbox)s: %(msg)s')) # Maybe wipe the old archives if wipe: if mlist.scrub_nondigest: @@ -177,10 +182,6 @@ def main(): shutil.rmtree(mlist.archive_dir()) if mlist.scrub_nondigest and saved: os.renames(savedir, atchdir) - try: - fp = open(mbox) - except IOError, msg: - usage(3, _('Cannot open mbox file %(mbox)s: %(msg)s')) archiver = HyperArchive(mlist) archiver.VERBOSE = verbose -- cgit v1.2.3