Commit aa050993 authored by Jelmer Vernooij's avatar Jelmer Vernooij

Require changes in debian/rules for useless-autoreconf-build-depends.

parent dc48cfd9
......@@ -2,6 +2,8 @@
from debian.changelog import Version
from io import StringIO
import re
import sys
from lintian_brush.control import (
drop_dependency,
ensure_minimum_version,
......@@ -17,20 +19,27 @@ def bump_debhelper(control):
control["Build-Depends"],
"dh-autoreconf")
update_control(source_package_cb=bump_debhelper)
changed = False
outf = StringIO()
with open('debian/rules', 'r') as f:
for line in f:
orig_line = line
line = re.sub(" --with[ =]autoreconf( .+|)$", "\\1", line)
line = re.sub(" --with[ =]autoreconf,", " --with=", line)
line = re.sub(" --with[ =]([^ ]),autoreconf([ ,])", " --with=\\1\\2",
line)
if orig_line != line:
changed = True
outf.write(line)
if not changed:
sys.exit(2)
with open('debian/rules', 'w') as f:
f.write(outf.getvalue())
update_control(source_package_cb=bump_debhelper)
print("Drop unnecessary dependency on dh-autoconf.")
print("Fixed-Lintian-Tags: useless-autoreconf-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