postinst's parsing of mailman3-web.py is brittle

Bug #1802036 reported by Paul Collins on 2018-11-07
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mailman3-web-charm
Undecided
Unassigned
mailman-suite (Ubuntu)
Undecided
Unassigned

Bug Description

The postinst script parses mailman3-web.py with sed, and relies on the "ADMIN" value looking like this:

ADMINS = (
     ('Mailman Suite Admin', '<email address hidden>'),
)

i.e. a) "Mailman Suite Admin" must be present and b) the closing paren must be left-aligned.

The mailman3-web charm writes the file in the following perfectly valid Python:

ADMINS = (
    ('Mailman Web Admin', '<email address hidden>'),
    )

but which violates a) (wrong text) and b) (closing paren is indented).

We can fix this particular point in the charm but ideally the package would be able to cope with any valid Python syntax.

Paul Collins (pjdc) wrote :

We've landed a change in mailman3-web-charm that avoids these parsing problems.

Changed in mailman-suite (Ubuntu):
status: New → Fix Released
status: Fix Released → New
Changed in mailman3-web-charm:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers