3
0
mirror of https://git.launchpad.net/ubuntu-dev-tools synced 2025-03-27 02:41:09 +00:00

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
debian
ubuntutools/sponsor_patch

5
debian/changelog vendored

@ -14,8 +14,9 @@ ubuntu-dev-tools (0.131) UNRELEASED; urgency=low
version numbers (LP: #727314) version numbers (LP: #727314)
- Iterate over changelog blocks rather than using Changelog's private - Iterate over changelog blocks rather than using Changelog's private
_blocks list. _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: * setup-packaging-environment:
- Software Sources isn't on the Administration menu, post Gnome 2 - Software Sources isn't on the Administration menu, post Gnome 2
(LP: #841975) (LP: #841975)

@ -315,8 +315,17 @@ def sponsor_patch(bug_number, build, builder, edit, keyid, lpinstance, update,
Logger.error("update-maintainer script failed.") Logger.error("update-maintainer script failed.")
sys.exit(1) 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 # Get new version of package
changelog = debian.changelog.Changelog(file("debian/changelog"))
try: try:
new_version = changelog.get_version() new_version = changelog.get_version()
except IndexError: except IndexError: