Commit 3980c16d authored by Jelmer Vernooij's avatar Jelmer Vernooij

Add fixer for package-uses-deprecated-debhelper-compat-version

parent d20c67e2
lintian-brush (0.7) UNRELEASED; urgency=medium
* Add fixer for package-needs-versioned-debhelper-build-depends.
* Add fixer for package-uses-deprecated-debhelper-compat-version
-- Jelmer Vernooij <jelmer@debian.org> Fri, 09 Nov 2018 21:07:23 +0000
......
......@@ -58,6 +58,9 @@ Lintian-Tags: package-needs-versioned-debhelper-build-depends
Fix-Script: package-uses-deprecated-source-override-location.sh
Lintian-Tags: package-uses-deprecated-source-override-location
Fix-Script: package-uses-deprecated-debhelper-compat-version.py
Lintian-Tags: package-uses-deprecated-debhelper-compat-version
Fix-Script: priority-extra-is-replaced-by-priority-optional.py
Lintian-Tags: priority-extra-is-replaced-by-priority-optional
......
#!/usr/bin/python3
import os
import sys
from lintian_brush.control import (
ensure_minimum_version,
update_control,
)
# TODO(jelmer): Can we get these elsewhere rather than
# hardcoding them here?
minimum_debhelper_version = 9
default_debhelper_version = 11
if os.path.exists('debian/compat'):
with open('debian/compat', 'r') as f:
current = int(f.read().strip())
if current < minimum_debhelper_version:
new = default_debhelper_version
with open('debian/compat', 'w') as f:
f.write('%s\n' % new)
else:
# Nothing to do
sys.exit(2)
else:
sys.exit(2)
def bump_debhelper(control):
control["Build-Depends"] = ensure_minimum_version(
control["Build-Depends"],
"debhelper",
new)
update_control(source_package_cb=bump_debhelper)
print("Bump debhelper from deprecated %s to %s." % (current, new))
print("Fixed-Lintian-Tags: package-uses-deprecated-debhelper-compat-version")
Source: f2fs-tools
Section: admin
Priority: optional
Maintainer: Jelmer Vernooij <jelmer@debian.org>
Build-Depends:
debhelper (>= 8),
pkg-config,
uuid-dev
Standards-Version: 4.2.0
Package: f2fs-tools
Architecture: linux-any
Depends: libf2fs5 (= ${binary:Version}), libf2fs-format4 (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
Description: Tools for Flash-Friendly File System
F2FS is a new filesystem for Linux aimed at NAND flash memory-based storage
devices, such as SSD, eMMC, and SD cards. It is based on Log-structured File
System (LFS).
Bump debhelper from deprecated 8 to 11.
Fixed-Lintian-Tags: package-uses-deprecated-debhelper-compat-version
Source: f2fs-tools
Section: admin
Priority: optional
Maintainer: Jelmer Vernooij <jelmer@debian.org>
Build-Depends:
debhelper (>= 11),
pkg-config,
uuid-dev
Standards-Version: 4.2.0
Package: f2fs-tools
Architecture: linux-any
Depends: libf2fs5 (= ${binary:Version}), libf2fs-format4 (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
Description: Tools for Flash-Friendly File System
F2FS is a new filesystem for Linux aimed at NAND flash memory-based storage
devices, such as SSD, eMMC, and SD cards. It is based on Log-structured File
System (LFS).
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