Package: lintian
Version: 2.5.59
Severity: wishlist
Tags: patch
X-Debbugs-Cc: debian-gtk-gn...@lists.debian.org
I've just uploaded gobject-introspection/1.54.1-3, with GIR mini-policy
updates aimed at reducing false positives from Lintian. The mini-policy
now recommends that when multiple GIR typelibs are bundled in a single
package (like gir1.2-gtk-3.0 containing Gtk-3.0, Gdk-3.0 and GdkX11-3.0),
that package should have Provides entries for those typelibs' canonical
package names (in this case gir1.2-gdk-3.0 and gir1.2-gdkx11-3.0).
This gives Lintian enough information to avoid some unnecessary warnings
when the attached patches are applied.
Additionally, patch 0001 silences a false-positive when packages ship
files other than GIR XML in /usr/share/gir-1.0 (gobject-introspection will
probably be the only package to do this, but it seemed more correct to
make this change rather than using an override).
Thanks,
smcv
>From 72fa7ee6c470b1c6051eb4f36342ff97b3550f91 Mon Sep 17 00:00:00 2001
From: Simon McVittie
Date: Thu, 2 Nov 2017 14:50:04 +
Subject: [PATCH 1/4] gir: Only treat *.gir files in usr/share/gir-1.0 as GIR
gir-1.2.rnc, a RELAX NG schema, is in this directory but is not itself
a GIR file.
Signed-off-by: Simon McVittie
---
checks/gir.pm | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/checks/gir.pm b/checks/gir.pm
index 59d7e4099..b64d19577 100644
--- a/checks/gir.pm
+++ b/checks/gir.pm
@@ -69,7 +69,10 @@ sub _run_binary {
$madir = '${DEB_HOST_MULTIARCH}' unless defined $madir;
if (my $xmldir = $info->index_resolved_path('usr/share/gir-1.0/')) {
-push @girs, $xmldir->children;
+foreach my $child ($xmldir->children) {
+next unless $child =~ m/\.gir$/;
+push @girs, $child;
+}
}
if (my $dir = $info->index_resolved_path('usr/lib/girepository-1.0/')) {
--
2.15.0
>From 4b5b78db2b0334d1e5f9baae9dca41bd10dbe403 Mon Sep 17 00:00:00 2001
From: Simon McVittie
Date: Sat, 11 Nov 2017 14:04:20 +
Subject: [PATCH 2/4] gir: Allow a Provides on the canonical name for typelib
packages
It's OK for closely related typelibs to be grouped together, as was done
for packages like GLib, GTK+ and Tracker, as long as they are expected
to bump introspection ABI version at the same time. The new mini-policy
version in gobject-introspection/1.54.1-3 recommends that they have
a Provides on all the package names that would have been used if they
were separated (for example gir1.2-gtk-3.0 Provides gir1.2-gdk-3.0 and
gir1.2-gdkx11-3.0). If this is done, we can detect it and suppress the
typelib-package-name-does-not-match tag.
Signed-off-by: Simon McVittie
---
checks/gir.desc | 15 ++-
checks/gir.pm | 3 ++-
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/checks/gir.desc b/checks/gir.desc
index 611b4ac54..b154d6a88 100644
--- a/checks/gir.desc
+++ b/checks/gir.desc
@@ -48,11 +48,16 @@ Certainty: possible
Info: GObject-Introspection binary typelibs (Foo-23.typelib)
should normally be made available in a package named gir1.2-foo-23.
.
- Please ignore and override this tag if the typelib is deliberately shipped
- in a package whose name does not match the typelib's machine-readable name.
- For example, gir1.2-glib-2.0 is named for the GLib-2.0
- typelib, but also contains the GObject-2.0 and Gio-2.0
- typelibs; this is unconventional, but is allowed.
+ If multiple typelibs are shipped in the same package, then that package
+ should have versioned Provides for the names that would have been
+ used for separate packages. This arrangement should only be used if the
+ included typelibs' versions are expected to remain the same at all times.
+ .
+ For example, gir1.2-gtk-3.0 is named for the Gtk-3.0
+ typelib, but also contains the Gdk-3.0 and GdkX11-3.0
+ typelibs. It should have versioned Provides entries for
+ gir1.2-gdk-3.0 (= ${binary:Version})
+ and gir1.2-gdkx11-3.0 (= ${binary:Version}) to indicate this.
Ref: /usr/share/doc/gobject-introspection/policy.txt
Tag: typelib-section-not-introspection
diff --git a/checks/gir.pm b/checks/gir.pm
index b64d19577..5001ea0b8 100644
--- a/checks/gir.pm
+++ b/checks/gir.pm
@@ -121,7 +121,8 @@ sub _run_binary {
foreach my $typelib (@typelibs) {
my $expected = 'gir1.2-' . lc($typelib->basename);
$expected =~ s/\.typelib$//;
-if ($pkg ne $expected) {
+if ($pkg ne $expected
+and not $info->relation('provides')->implies($expected)) {
tag('typelib-package-name-does-not-match', $typelib, $expected);
}
}
--
2.15.0
>From 965fa362140c573ff0184ee7aa93b92fde3b685f Mon Sep 17 00:00:00 2001
From: Simon McVittie
Date: Sat, 11 Nov 2017 14:01:03 +
Subject: [PATCH 3/4] gir: -dev can Depend on a typelib that Provides the
canonical name
If gir1.2-foo-1.0 bundles typelibs for both Foo-1.0