[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#881491: lintian: update gir checks for gobject-introspection/1.54.1-3 mini-policy



On Sun, 12 Nov 2017 at 12:35:40 +0000, Simon McVittie wrote:
> I've just uploaded gobject-introspection/1.54.1-3, with GIR mini-policy
> updates aimed at reducing false positives from Lintian.

Looking at the archive's Lintian warnings, we also need to specify what
to do about the rare typelibs that contain underscores (like v_sim) -
current Lintian gives an impossible recommendation, since underscores
aren't allowed in package names. I've chosen to replace underscores
with hyphen/minus. See attached patch, corresponding to a policy.txt
change committed to gobject-introspection svn but not yet released.

    smcv
>From 41444673f26a4a54bf163f25e04c05a3581ebd36 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@debian.org>
Date: Sun, 12 Nov 2017 13:22:27 +0000
Subject: [PATCH] gir: Replace underscore in typelib name with hyphen in
 package name

v_sim-3.7.gir in the v-sim package would otherwise produce an
invalid package name.

Signed-off-by: Simon McVittie <smcv@debian.org>
---
 checks/gir.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/checks/gir.pm b/checks/gir.pm
index 90d4ae134..eb4ab5d6e 100644
--- a/checks/gir.pm
+++ b/checks/gir.pm
@@ -112,6 +112,7 @@ sub _run_binary {
   GIR: foreach my $gir (@girs) {
         my $expected = 'gir1.2-' . lc($gir->basename);
         $expected =~ s/\.gir$//;
+        $expected =~ tr/_/-/;
         my $version = $info->field('version');
 
         foreach my $bin ($group->get_binary_processables) {
@@ -131,6 +132,7 @@ sub _run_binary {
     foreach my $typelib (@typelibs) {
         my $expected = 'gir1.2-' . lc($typelib->basename);
         $expected =~ s/\.typelib$//;
+        $expected =~ tr/_/-/;
         if ($pkg ne $expected
             and not $info->relation('provides')->implies($expected)) {
             tag('typelib-package-name-does-not-match', $typelib, $expected);
-- 
2.15.0


Reply to: