diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2015-04-18 21:10:01 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2015-04-18 21:10:01 +0300 |
commit | e0bb9149ff8e6d6c263e1bff225851dc5b66dc10 (patch) | |
tree | 0ae25f5922b23176c613467ac1146a0ddb522a2e | |
parent | 0018c8d2531e93883441e8bddab87548f190e176 (diff) | |
download | mailman-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-x | bin/mailsync | 11 | ||||
-rw-r--r-- | install.pl | 1 |
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 | |||
@@ -64,7 +64,7 @@ kwtab = { | |||
64 | 64 | ||
65 | conf = { } | 65 | conf = { } |
66 | 66 | ||
67 | os.environ["PATH"] = "/srv/mailman/bin:/usr/local/bin:" + os.environ["PATH"] | 67 | os.environ["PATH"] = os.path.dirname(sys.argv[0]) + ':' + os.environ["PATH"] |
68 | 68 | ||
69 | status = EX_OK | 69 | status = EX_OK |
70 | 70 | ||
@@ -158,11 +158,14 @@ def mboxtohtml(listid): | |||
158 | print("\"%s\": %s" % (str(cmd), err), file=sys.stderr) | 158 | print("\"%s\": %s" % (str(cmd), err), file=sys.stderr) |
159 | status = EX_FAILURE | 159 | status = EX_FAILURE |
160 | 160 | ||
161 | save_state(listid, len(inbox)) | ||
162 | if t > 0: | 161 | if t > 0: |
162 | n = len(inbox) | ||
163 | debug(1, "%s: %d messages, timestamp %d" % (name,n,t)) | ||
164 | save_state(listid, n) | ||
163 | save_timestamp(listid, t) | 165 | save_timestamp(listid, t) |
164 | 166 | return True | |
165 | return True | 167 | debug(1, "%s: not modified" % (name)) |
168 | return False | ||
166 | 169 | ||
167 | def savane_lists(file = None): | 170 | def savane_lists(file = None): |
168 | if 'listfile' in conf['core']: | 171 | if 'listfile' in conf['core']: |
@@ -114,6 +114,7 @@ sub install { | |||
114 | my ($src, $dst) = @_; | 114 | my ($src, $dst) = @_; |
115 | print "$progname: Installing $src to $dst\n"; | 115 | print "$progname: Installing $src to $dst\n"; |
116 | find(sub { | 116 | find(sub { |
117 | return if /~$/; | ||
117 | my $dir = $File::Find::dir; | 118 | my $dir = $File::Find::dir; |
118 | my $target; | 119 | my $target; |
119 | if ($dir eq $src) { | 120 | if ($dir eq $src) { |