it seems that the documented ${listname} does not work, this is what is causing the mhonarc archive creation to fail.
what is the actual macro that I use to expand the actual list name within the PUBLIC_EXTERNAL_ARCHIVER option?
-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Allen Bolderoff allen@gist.net.au LNC - Redhat and Linux, help and commentary http://linux.netnerve.com CTPC - Caffeine - get it here: http://www.coffee-tea-pots-cups.com/ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ GPG fingerprint = CBB0 8626 702C 3D01 B5AD A54A DC2C 93B7 3E4B 6472 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
it seems that the documented ${listname} does not work, this is what is causing the mhonarc archive creation to fail.
what is the actual macro that I use to expand the actual list name within the PUBLIC_EXTERNAL_ARCHIVER option?
I have not read the documentation and do not know how variable substitution/macro expansion should work. However, take a look at the code quoted by Christopher:
d = SafeDict({'listname': self.real_name})
cmd = ar % d
What we have here is Python's extended format-string handling, so using '%(listname)s' instead of '${listname}' might give the intended result.
Python example: '/bin/touch /tmp/foo%(listname)s' % {'listname': 'bar'} -> '/bin/touch /tmp/foobar'
-- Anton Gyllenberg
at the code quoted by Christopher:
d = SafeDict({'listname': self.real_name}) cmd = ar % d
What we have here is Python's extended format-string handling, so using '%(listname)s' instead of '${listname}' might give the intended result.
Yup, that does it...
PUBLIC_EXTERNAL_ARCHIVER = 'cat - > /tmp/foo%(listname)s'
delivers fine with the original Mailman code. So I guess you should ignore my 'patch'. :)
The text in Defaults.py *does* need to be modified though... It lists ${listname}s as the proper format, but it should really be
%(listname)s
as you mentioned.
Someday Python will make sense to me. Oh, how I long for the days of Assembler... :)
Thanks for figuring that out.
Chris
"AG" == Anton Gyllenberg anton@mymlan.lifix.fi writes:
AG> What we have here is Python's extended format-string handling,
AG> so using '%(listname)s' instead of '${listname}' might give
AG> the intended result.
Exactly. I've updated the comment in Defaults.py{.in} to read:
# These variables control the use of an external archiver. Normally if # archiving is turned on (see ARCHIVE_TO_MBOX above and the list's archive* # attributes) the internal Pipermail archiver is used. This is the default if # both of these variables are set to false. When either is set, the value # should be a shell command string which will get passed to os.popen(). This # string can contain $(listname)s for dictionary interpolation. The name of # the list being archived will be substituted for this. # # Note that if you set one of these variables, you should set both of them # (they can be the same string). This will mean your external archiver will # be used regardless of whether public or private archives are selected. PUBLIC_EXTERNAL_ARCHIVER = 0 PRIVATE_EXTERNAL_ARCHIVER = 0
On Mon, 29 Nov 1999, Barry A. Warsaw wrote:
[...]
Exactly. I've updated the comment in Defaults.py{.in} to read:
# These variables control the use of an external archiver. Normally if # archiving is turned on (see ARCHIVE_TO_MBOX above and the list's archive* # attributes) the internal Pipermail archiver is used. This is the default if # both of these variables are set to false. When either is set, the value # should be a shell command string which will get passed to os.popen(). This # string can contain $(listname)s for dictionary interpolation. The name of ^
% ?
[...]
-- "Cuando man~ana llegue pelearemos segun lo que man~ana exija" (R. Kipling) Geek Code disponible via finger alvherre@enlaces.c5.cl Alvaro Herrera (alvherre@c5.cl)
participants (5)
-
Allen Bolderoff
-
Alvaro Herrera
-
Anton Gyllenberg
-
Barry A. Warsaw
-
Christopher Lindsey