aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2015-04-18 21:10:01 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2015-04-18 21:10:01 +0300
commite0bb9149ff8e6d6c263e1bff225851dc5b66dc10 (patch)
tree0ae25f5922b23176c613467ac1146a0ddb522a2e
parent0018c8d2531e93883441e8bddab87548f190e176 (diff)
downloadmailman-e0bb9149ff8e6d6c263e1bff225851dc5b66dc10.tar.gz
mailman-e0bb9149ff8e6d6c263e1bff225851dc5b66dc10.tar.bz2
Minor bugfixes
* bin/mailsync: Improve debugging. Don't hardcode PATH components. * install.pl (install): Ignore backup copies.
-rwxr-xr-xbin/mailsync11
-rw-r--r--install.pl1
2 files changed, 8 insertions, 4 deletions
diff --git a/bin/mailsync b/bin/mailsync
index 04b0f3b..2667c60 100755
--- a/bin/mailsync
+++ b/bin/mailsync
@@ -61,13 +61,13 @@ kwtab = {
#ssl: FIXME
}
}
conf = { }
-os.environ["PATH"] = "/srv/mailman/bin:/usr/local/bin:" + os.environ["PATH"]
+os.environ["PATH"] = os.path.dirname(sys.argv[0]) + ':' + os.environ["PATH"]
status = EX_OK
def debug(lev, text):
if (dbg >= lev):
print("debug: %s" % text, file=sys.stderr)
@@ -155,17 +155,20 @@ def mboxtohtml(listid):
(str(cmd), p.returncode), file=sys.stderr)
status = EX_FAILURE
if err:
print("\"%s\": %s" % (str(cmd), err), file=sys.stderr)
status = EX_FAILURE
- save_state(listid, len(inbox))
if t > 0:
+ n = len(inbox)
+ debug(1, "%s: %d messages, timestamp %d" % (name,n,t))
+ save_state(listid, n)
save_timestamp(listid, t)
-
- return True
+ return True
+ debug(1, "%s: not modified" % (name))
+ return False
def savane_lists(file = None):
if 'listfile' in conf['core']:
with open(conf['core']['listfile'], 'r') as f:
for line in f:
r = line.strip()
diff --git a/install.pl b/install.pl
index d91b17f..0bcc464 100644
--- a/install.pl
+++ b/install.pl
@@ -111,12 +111,13 @@ sub runcmd {
}
sub install {
my ($src, $dst) = @_;
print "$progname: Installing $src to $dst\n";
find(sub {
+ return if /~$/;
my $dir = $File::Find::dir;
my $target;
if ($dir eq $src) {
$target = "$dst/$_";
} else {
$dir =~ s#^$src/##;

Return to:

Send suggestions and report system problems to the System administrator.