This is an automated email from the git hooks/post-receive script. lamby pushed a commit to branch master in repository lintian.
commit e248cfbb716a2692f5759b5d57041fbb0ea0bdc3 Author: Chris Lamb <[email protected]> Date: Thu Jul 20 20:29:00 2017 +0100 Add check for GObject Introspection packages that are missing binary dependencies on ${gir:Depends}. (Closes: #860801) --- checks/control-file.desc | 10 ++++++++ checks/control-file.pm | 9 +++++++ debian/changelog | 2 ++ .../debian/debian/control.in | 28 ++++++++++++++++++++++ .../desc | 5 ++++ .../tags | 1 + 6 files changed, 55 insertions(+) diff --git a/checks/control-file.desc b/checks/control-file.desc index 291f0d6..d2add23 100644 --- a/checks/control-file.desc +++ b/checks/control-file.desc @@ -296,3 +296,13 @@ Ref: policy 5.6.8 Info: The values of the Architecture field in debian/control must not be separated by anything else than spaces; that is, they must form a single line and are not allowed to span multiple lines. + +Tag: gobject-instrospection-package-missing-depends-on-gir-depends +Severity: serious +Certainty: certain +Info: The package is a GObject Instrospection package but it does not specify a + dependency on the ${gir:Depends} substvar. Missing these dependenceis usually + results in the program aborting. + . + This is usually an accidental omission and/or where the maintainer omits + the <tt>--with=gir</tt> debhelper sequence. diff --git a/checks/control-file.pm b/checks/control-file.pm index 873658a..831f5b3 100644 --- a/checks/control-file.pm +++ b/checks/control-file.pm @@ -382,6 +382,15 @@ sub run { } } + # Check for GObject Introspection packages that are missing ${gir:Depends} + foreach my $bin (@package_names) { + next unless $bin =~ m/gir[\d\.]+-.*-[\d\.]+$/; + my $relation = $info->binary_relation($bin, 'all'); + tag 'gobject-instrospection-package-missing-depends-on-gir-depends', + $bin + unless $relation->implies('${gir:Depends}'); + } + return; } diff --git a/debian/changelog b/debian/changelog index d707d5b..e549e03 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,8 @@ lintian (2.5.52) UNRELEASED; urgency=medium + [NT] Remove check for missing versioned build-depends for dpkg and debhlper when using Build-Profiles. The necessary versions are now in oldstable. + + [CL] Add check for GObject Introspection packages that are missing + binary dependencies on ${gir:Depends}. (Closes: #860801) * checks/changes-file.{desc,pm}: + [CL] Check for the presence of an .asc signature if an upstream signing key is present. (Closes: #833585) diff --git a/t/tests/control-file-gobject-instrospection-package-missing-gir-depends/debian/debian/control.in b/t/tests/control-file-gobject-instrospection-package-missing-gir-depends/debian/debian/control.in new file mode 100644 index 0000000..3ee2521 --- /dev/null +++ b/t/tests/control-file-gobject-instrospection-package-missing-gir-depends/debian/debian/control.in @@ -0,0 +1,28 @@ +Source: {$source} +Section: introspection +Priority: extra +Maintainer: {$author} +Standards-Version: {$standards_version} +Build-Depends: {$build_depends} + +Package: gir1.1-missing-gir-depends-2.2 +Architecture: {$architecture} +Depends: $\{misc:Depends\} +Description: {$description} + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + This package should be tagged by Lintian. + +Package: gir1.1-gir-depends-present-2.2 +Architecture: {$architecture} +Depends: $\{misc:Depends\}, $\{gir:Depends\} +Description: {$description}: False + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + This package should not be tagged by Lintian. diff --git a/t/tests/control-file-gobject-instrospection-package-missing-gir-depends/desc b/t/tests/control-file-gobject-instrospection-package-missing-gir-depends/desc new file mode 100644 index 0000000..b67c33e --- /dev/null +++ b/t/tests/control-file-gobject-instrospection-package-missing-gir-depends/desc @@ -0,0 +1,5 @@ +Testname: control-file-gobject-instrospection-package-missing-gir-depends +Version: 1.0 +Description: Check for missing binary dependencies on ${gir:Depends} +Test-For: + gobject-instrospection-package-missing-depends-on-gir-depends diff --git a/t/tests/control-file-gobject-instrospection-package-missing-gir-depends/tags b/t/tests/control-file-gobject-instrospection-package-missing-gir-depends/tags new file mode 100644 index 0000000..e591a1e --- /dev/null +++ b/t/tests/control-file-gobject-instrospection-package-missing-gir-depends/tags @@ -0,0 +1 @@ +E: control-file-gobject-instrospection-package-missing-gir-depends source: gobject-instrospection-package-missing-depends-on-gir-depends gir1.1-missing-gir-depends-2.2 -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git

