Merge lp://staging/~gz/bzr-builddeb/merge_changelog_invalid_version_893495 into lp://staging/bzr-builddeb

Proposed by Martin Packman
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 663
Merged at revision: 661
Proposed branch: lp://staging/~gz/bzr-builddeb/merge_changelog_invalid_version_893495
Merge into: lp://staging/bzr-builddeb
Diff against target: 102 lines (+46/-8)
2 files modified
merge_changelog.py (+10/-1)
tests/test_merge_changelog.py (+36/-7)
To merge this branch: bzr merge lp://staging/~gz/bzr-builddeb/merge_changelog_invalid_version_893495
Reviewer Review Type Date Requested Status
Jelmer Vernooij code Approve
Review via email: mp+85572@code.staging.launchpad.net

Description of the change

Handle dpkg-mergechangelogs aborting by falling back to other merge hooks rather than thinking it's a successful merge resulting in a zero byte file. This can be hit with invalid versions in one of the changelogs, and newer dpkg versions have become stricter on this front.

Also resolved some bad encoding handling while there, as it was part of the original bug report and gets in the way of one of the neater way of testing (non-ascii versions are rejected in my older dpkg version as well).

The test is written in such a way as it should keep passing if my dpkg patch is accepted and the merge starts succeeding it will continue to pass, regardless of the version installed. That's the plan, at least.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Thanks, that's a reasonable way of handling it.

+ Depending on the dpkg version, bad version may be tolerated or not.
"a bad version" / "bad versions" ?

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches