sponsor-patch: Perform strict validation on the first changelog entry.

This commit is contained in:
Stefano Rivera 2011-09-10 01:21:07 +02:00
parent dc962d7a3f
commit 8bb4628586
2 changed files with 13 additions and 3 deletions

5
debian/changelog vendored
View File

@ -14,8 +14,9 @@ ubuntu-dev-tools (0.131) UNRELEASED; urgency=low
version numbers (LP: #727314)
- Iterate over changelog blocks rather than using Changelog's private
_blocks list.
* ubuntutools.update_maintainer: Don't use strict changelog parsing
(LP: #806633)
LP: #806633:
- ubuntutools.update_maintainer: Don't use strict changelog parsing
- sponsor-patch: Perform strict validation on the first changelog entry.
* setup-packaging-environment:
- Software Sources isn't on the Administration menu, post Gnome 2
(LP: #841975)

View File

@ -315,8 +315,17 @@ def sponsor_patch(bug_number, build, builder, edit, keyid, lpinstance, update,
Logger.error("update-maintainer script failed.")
sys.exit(1)
# Check the changelog
changelog = debian.changelog.Changelog()
try:
changelog.parse_changelog(file("debian/changelog"), max_blocks=1,
strict=True)
except debian.changelog.ChangelogParseError, e:
Logger.error("The changelog entry doesn't validate: %s", str(e))
ask_for_manual_fixing()
continue
# Get new version of package
changelog = debian.changelog.Changelog(file("debian/changelog"))
try:
new_version = changelog.get_version()
except IndexError: