Commit f3487404 authored by Jelmer Vernooij's avatar Jelmer Vernooij

Add support for fixing debhelper-but-no-misc-depends.

parent 910d6e19
......@@ -24,6 +24,7 @@ subset of the issues:
* ancient-python-version-field
* control-file-with-CRLF-EOLs
* copyright-has-crs
* debhelper-but-no-misc-depends
* debian-control-has-empty-field
* debian-control-has-obsolete-dbg-package
* debian-pyversions-is-obsolete
......
......@@ -2,6 +2,7 @@ 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
* Add support for fixing debhelper-but-no-misc-depends.
-- Jelmer Vernooij <jelmer@debian.org> Fri, 09 Nov 2018 21:07:23 +0000
......
#!/usr/bin/python3
from lintian_brush.control import (
add_dependency,
parse_relations,
update_control,
)
uses_debhelper = False
misc_depends_added = []
def check_debhelper(control):
global uses_debhelper
if "Build-Depends" not in control:
return
for entry in parse_relations(control["Build-Depends"]):
(head_whitespace, relation, tail_whitespace) = entry
if any(r.name == 'debhelper' for r in relation):
uses_debhelper = True
def add_misc_depends(control):
global uses_debhelper
if not uses_debhelper:
return
for entry in parse_relations(control["Depends"]):
(head_whitespace, relation, tail_whitespace) = entry
if any(r.name == '${misc:Depends}' for r in relation):
return
control["Depends"] = add_dependency(control["Depends"], "${misc:Depends}")
misc_depends_added.append(control["Package"])
update_control(source_package_cb=check_debhelper,
binary_package_cb=add_misc_depends)
print("Add missing ${misc:Depends} to Depends for %s." %
", ".join(misc_depends_added))
print("Fixed-Lintian-Tags: debhelper-but-no-misc-depends")
......@@ -7,6 +7,9 @@ Lintian-Tags: control-file-with-CRLF-EOLs
Fix-Script: copyright-has-crs.sh
Lintian-Tags: copyright-has-crs
Fix-Script: debhelper-but-no-misc-depends.py
Lintian-Tags: debhelper-but-no-misc-depends
Fix-Script: debian-control-has-empty-field.py
Lintian-Tags: debian-control-has-empty-field
......
Source: f2fs-tools
Section: admin
Priority: optional
Maintainer: Jelmer Vernooij <jelmer@debian.org>
Build-Depends:
debhelper (>= 9)
Standards-Version: 4.2.0
Package: f2fs-tools
Architecture: linux-any
Depends: libf2fs5 (= ${binary:Version}), libf2fs-format4 (= ${binary:Version}), ${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).
Package: f2fs-tools-dbg
Section: debug
Architecture: linux-any
Depends: f2fs-tools (= ${binary:Version}), ${misc:Depends}
Description: Tools for Flash-Friendly File System (debug)
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).
.
This package contains the debugging symbols.
Add missing ${misc:Depends} to Depends for f2fs-tools.
Fixed-Lintian-Tags: debhelper-but-no-misc-depends
Source: f2fs-tools
Section: admin
Priority: optional
Maintainer: Jelmer Vernooij <jelmer@debian.org>
Build-Depends:
debhelper (>= 9)
Standards-Version: 4.2.0
Package: f2fs-tools
Architecture: linux-any
Depends: libf2fs5 (= ${binary:Version}), libf2fs-format4 (= ${binary:Version}), ${shlibs:Depends}, ${misc: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).
Package: f2fs-tools-dbg
Section: debug
Architecture: linux-any
Depends: f2fs-tools (= ${binary:Version}), ${misc:Depends}
Description: Tools for Flash-Friendly File System (debug)
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).
.
This package contains the debugging symbols.
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