Patch for making digest_arch a bit less stupid

I am applying the following patch to the debian package of mailman unless somebody screams loudly. It will close debian bug #59359 ( http://www.debian.org/59359 ).
--- bin/digest_arch~ Tue Mar 21 07:26:18 2000 +++ bin/digest_arch Sat Mar 24 01:14:51 2001 @@ -90,7 +90,7 @@ last_dow = days_of_week.index(dow)
if len(year) == 2:
- year = '19' + year
- year = 1900 + year # some MUAs are stupid outfile.write("From %s %s %s %s %s %s\n" % (From, dow, mon, day, time, year))
# print "From %s %s %s %s %s %s" % (From, dow, mon, day, time, year)

"TFH" == Tollef Fog Heen tollef@add.no writes:
TFH> I am applying the following patch to the debian package of
TFH> mailman unless somebody screams loudly. It will close debian
TFH> bug #59359 ( http://www.debian.org/59359 ).
Tollef, do you have a working URL for that? It comes up "not found" for me.
| --- bin/digest_arch~ Tue Mar 21 07:26:18 2000
| +++ bin/digest_arch Sat Mar 24 01:14:51 2001
| @@ -90,7 +90,7 @@
| last_dow = days_of_week.index(dow)
| if len(year) == 2:
| - year = '19' + year
| + year = 1900 + year # some MUAs are stupid
I'd like to know what it fixes, but you should be aware that bin/digest_arch is quite unmaintained. If you find it useful and that patch makes sense, I'll integrate it with the current CVS tree. I've never personally made any substantive change to that file.
-Barry

- (Barry A. Warsaw)
| >>>>> "TFH" == Tollef Fog Heen tollef@add.no writes: | | TFH> I am applying the following patch to the debian package of | TFH> mailman unless somebody screams loudly. It will close debian | TFH> bug #59359 ( http://www.debian.org/59359 ). | | Tollef, do you have a working URL for that? It comes up "not found" | for me.
s/www/bugs/
sorry - a bit late in the evening.
| | --- bin/digest_arch~ Tue Mar 21 07:26:18 2000
| | +++ bin/digest_arch Sat Mar 24 01:14:51 2001
| | @@ -90,7 +90,7 @@
| | last_dow = days_of_week.index(dow)
|
| | if len(year) == 2:
| | - year = '19' + year
| | + year = 1900 + year # some MUAs are stupid
|
| I'd like to know what it fixes, but you should be aware that
| bin/digest_arch is quite unmaintained. If you find it useful and that
| patch makes sense, I'll integrate it with the current CVS tree. I've
| never personally made any substantive change to that file.
I don't use it, but I have a bug report about "mailman archiver not handling years like '100'".
And the patch needs a fix :/
--- bin/digest_arch~ Tue Mar 21 07:26:18 2000 +++ bin/digest_arch Sat Mar 24 01:14:51 2001 @@ -90,7 +90,7 @@ last_dow = days_of_week.index(dow)
if len(year) == 2:
- year = '19' + year
- year = 1900 + int(year) # some MUAs are stupid
and the line
outfile.write("From %s %s %s %s %s %s\n" % (From, dow, mon, day, time, year))
needs to be changed to
outfile.write("From %s %s %s %s %s %4d\n" % (From, dow, mon, day, time, year))
.
If this isn't used at all any more, I'll just close the bug report, and you can ignore this patch.

"TFH" == Tollef Fog Heen tollef@add.no writes:
TFH> I don't use it, but I have a bug report about "mailman
TFH> archiver not handling years like '100'".
TFH> And the patch needs a fix :/
| --- bin/digest_arch~ Tue Mar 21 07:26:18 2000
| +++ bin/digest_arch Sat Mar 24 01:14:51 2001
| @@ -90,7 +90,7 @@
| last_dow = days_of_week.index(dow)
| if len(year) == 2:
| - year = '19' + year
| + year = 1900 + int(year) # some MUAs are stupid
TFH> If this isn't used at all any more, I'll just close the bug
TFH> report, and you can ignore this patch.
I've applied the patch, but not tested it, since digest_arch is deprecated. You can go ahead and close the debian bug. Other than this, Mailman 2.x's archiver should handle dates < 100 "properly".
Thanks, -Barry
участники (2)
-
barry@digicool.com
-
Tollef Fog Heen