Commit a9e9e366 authored by Jelmer Vernooij's avatar Jelmer Vernooij

Allow fixers to provide an empty description when there are no

changes.
parent d4d7d2e9
Pipeline #35998 failed with stages
in 2 minutes and 17 seconds
lintian-brush (0.13) UNRELEASED; urgency=medium
[ Dmitry Bogatov ]
* Don't display error when debian/compat is missing. Closes: #921972
[ Jelmer Vernooij ]
* Allow fixers to provide an empty description when there are no
changes.
-- Dmitry Bogatov <KAction@debian.org> Sun, 10 Feb 2019 22:52:32 +0000
lintian-brush (0.12) unstable; urgency=medium
......
#!/usr/bin/python3
import sys
from lintian_brush.control import (
ensure_minimum_version,
update_control,
......@@ -21,9 +22,9 @@ try:
with open('debian/compat', 'r') as f:
minimum_version = f.read().strip()
except FileNotFoundError:
minimum_version = 9999 # Not used anyway.
else:
update_control(source_package_cb=bump_debhelper)
sys.exit(0)
update_control(source_package_cb=bump_debhelper)
print("Bump debhelper dependency to >= %s, since that's what is "
"used in debian/compat." % minimum_version)
......
......@@ -163,8 +163,6 @@ class ScriptFixer(Fixer):
raise FixerScriptFailed(
self.script_path, p.returncode,
stderr.read())
if not description:
raise DescriptionMissing(self)
description = description.decode('utf-8')
lines = []
fixed_tags = []
......@@ -389,11 +387,13 @@ def run_lintian_fixer(local_tree, fixer, committer=None,
RenameMap.guess_renames(
local_tree.basis_tree(), local_tree, dry_run=False)
summary = result.description.splitlines()[0]
if not local_tree.has_changes():
raise NoChanges("Script didn't make any changes")
if not result.description:
raise DescriptionMissing()
summary = result.description.splitlines()[0]
if update_changelog is None:
# Default to true. Perhaps do something more clever.
update_changelog = True
......
Bump debhelper dependency to >= 9999, since that's what is used in debian/compat.
Fixed-Lintian-Tags: package-needs-versioned-debhelper-build-depends
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment