chiark / gitweb /
dgit: importing: Better handle commas in changelog maintainer fields
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 5 Feb 2017 15:22:32 +0000 (15:22 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 5 Feb 2017 20:46:47 +0000 (20:46 +0000)
commitfdb7b2dc0fd5c24d760710fb3247546a83e1628c
tree320d843c1d784b18d21e4d5ba9fdd48656461661
parent8c0703a043f1deedc4dee9500d8f7da8b382543a
dgit: importing: Better handle commas in changelog maintainer fields

Some maintainers have written commas in the maintainer field of their
changelog entries.  Such changelog entries could not be imported.

clogp_authline had code to replace multiple maintainers (which are
hypothetical right now) into just the first, but that trips on these
maintainers with commas.

Ultimately we should expect that the Maintainer: field from
dpkg-parsechangelog is in (a subset of) RFC5322 recipient field
format.  In that format, any commas would need to be quoted.

So:

If the Maintainer field from dpkg-parsechangelog has a comma which has
no @ or " before it, then we consider it a single old-school
comma-containing maintainer.  If it were intended as multiple
maintainers, then the first maintainer has no email address.  Not
coping properly with that very-hypothetical future seems OK.  We
simply delete the comma, so that the things we record in the git
history are more conservative.

If there is a " we leave things untouched in the hope that this is a
single address, albeit with some quoting.  The alternative would be to
try to use a full RFC5322 parser.  That's quite a risky change.

Perhaps we will revisit this after stretch.

For now this Closes:#852661.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
dgit