This reverts commit 6ff151dc208809e1b8e3108c69c05090174e6221.
This commit broke when using the snap on Focal (but not on Bionic) with:
locale.Error: unsupported locale setting
...when calling locale.setlocale().
Since this is a regression, I'm reverting it immediately.
However I've since learned that locale-specific behaviour is not
activated until locale.setlocale() is called explicitly anyway, so
perhaps ensuring consistent behaviour despite locale settings is not as
important or necessary as I had previously thought.
To handle the edge case of changelog entry signoff line dates not being
parseable due to not being valid dates, the spec now requires that we
revert to using the timestamp of the source package data instance
instead (which is what we always use for the commit date). This change
implements this requirement and adds overrides for the initial set of
changelog dates to be ignored as defined by the spec.
Allow the caller to override the author_date used when calling
GitUbuntuRepository.commit_source_tree(). This allows for adding
changelog date overrides in a subsequent commit in the case that illegal
changelog dates cannot be parsed.
RFCs 5321/5322/6531 make it clear that an angle bracket is not a valid
part of an email address, so we can correctly parse extra ones as not
being part of the email address.
This requires making the '.*' capture of the email address non-greedy by
appending a '?', so that the greedy '<+' and '>+' can grab the angle
brackets during the regexp match.
In puppet 0.24.4-6, the changelog entry has an extra closing angle
bracket around the email address in the sign-off line. As an angle
bracket is unambiguously not part of the email address (according to
RFCs 5321/5322/6531), this can still be unambiguously parsed, so we add
a failing test case for it to be fixed in a subsequent change.