Bug#832840: license-reconcile: FTBFS: dh_auto_test: perl Build test --verbose 1 returned exit code 255

Petter Reinholdtsen pere at hungry.com
Wed Aug 24 09:05:16 UTC 2016


While I agree that it would be useful to have an active maintainer of the package,
I hope it will not block this useful tool to stay in Debian as long as it is
working.

I had a look at the current failure, and discovered that there are two issues blocking
the build.  One is the changed output format from licensecheck, where a trailing
period now show up in the copyright strings.  We can either remove it like this:

diff --git a/lib/Debian/LicenseReconcile/LicenseCheck.pm b/lib/Debian/LicenseReconcile/LicenseCheck.pm
index 9cc1f30..472e101 100644
--- a/lib/Debian/LicenseReconcile/LicenseCheck.pm
+++ b/lib/Debian/LicenseReconcile/LicenseCheck.pm
@@ -12,7 +12,8 @@ Readonly my $YEAR_RE => '(?:\d{4}(?:\s|,\s|\-))';
 Readonly my $SQBR_RE => qr{
     \A
     \[
-    ([^]]*)
+    ([^]]*[^\.])
+    \.?
     \]
     \z
 }xms;

Or modify the tests to include the period in the string expected.  I would
recommend using this apprach:

diff --git a/t/08-licensecheck.t b/t/08-licensecheck.t
index 81fea4e..c4faf2f 100644
--- a/t/08-licensecheck.t
+++ b/t/08-licensecheck.t
@@ -86,61 +86,61 @@ cmp_deeply(\@data, bag(
     {
         file=>'Apache_2_0',
         license=>'test1',
-	copyright=>['Copyright: 2000 Testophilus Testownik <tester at testity.org>'],
+	copyright=>['Copyright: 2000 Testophilus Testownik <tester at testity.org>.'],
     },
     {
         file=>'FreeBSD',
         license=>'test2',
-	copyright=>['Copyright: 2001 Testophilus Testownik <tester at testity.org>'],
+	copyright=>['Copyright: 2001 Testophilus Testownik <tester at testity.org>.'],
     },
     {
         file=>'GPL_1',
         license=>'test3',
-	copyright=>['Copyright: 2002 Testophilus Testownik <tester at testity.org>'],
+	copyright=>['Copyright: 2002 Testophilus Testownik <tester at testity.org>.'],
     },
     {
         file=>'GPL_2',
         license=>'test4',
-	copyright=>['Copyright: 2003 Testophilus Testownik <tester at testity.org>'],
+	copyright=>['Copyright: 2003 Testophilus Testownik <tester at testity.org>.'],
     },
     {
         file=>'GPL_3',
         license=>'test5',
-	copyright=>['Copyright: 2004 Testophilus Testownik <tester at testity.org>'],
+	copyright=>['Copyright: 2004 Testophilus Testownik <tester at testity.org>.'],
     },
     {
         file=>'LGPL_2',
         license=>'test6',
-	copyright=>['Copyright: 2005 Testophilus Testownik <tester at testity.org>'],
+	copyright=>['Copyright: 2005 Testophilus Testownik <tester at testity.org>.'],
     },
     {
         file=>'LGPL_2_1',
         license=>'test7',
-	copyright=>['Copyright: 2006 Testophilus Testownik <tester at testity.org>'],
+	copyright=>['Copyright: 2006 Testophilus Testownik <tester at testity.org>.'],
     },
     {
         file=>'LGPL_3_0',
         license=>'test8',
-	copyright=>['Copyright: 2007 Testophilus Testownik <tester at testity.org>'],
+	copyright=>['Copyright: 2007 Testophilus Testownik <tester at testity.org>.'],
     },
     {
         file=>'MIT',
         license=>'test9',
-	copyright=>['Copyright: 2008 Testophilus Testownik <tester at testity.org>'],
+	copyright=>['Copyright: 2008 Testophilus Testownik <tester at testity.org>.'],
     },
     {
         file=>'Mozilla_2_0',
         license=>'test10',
-	copyright=>['Copyright: 2009 Testophilus Testownik <tester at testity.org>'],
+	copyright=>['Copyright: 2009 Testophilus Testownik <tester at testity.org>.'],
     },
     {
         file=>'QPL_1_0',
         license=>'test11',
-	copyright=>['Copyright: 2010 Testophilus Testownik <tester at testity.org>'],
+	copyright=>['Copyright: 2010 Testophilus Testownik <tester at testity.org>.'],
     },
     {
         file=>'Zlib',
         license=>'test12',
-	copyright=>['Copyright: 2011 Testophilus Testownik <tester at testity.org>'],
+	copyright=>['Copyright: 2011 Testophilus Testownik <tester at testity.org>.'],
     },
 ));
diff --git a/t/09-nolicense.t b/t/09-nolicense.t
index 2c3f0e9..797f9cf 100644
--- a/t/09-nolicense.t
+++ b/t/09-nolicense.t
@@ -12,5 +12,5 @@ isa_ok($LICENSECHECK, 'Debian::LicenseReconcile::LicenseCheck');
 my @data = $LICENSECHECK->get_info('nolicense.c');
 cmp_deeply(\@data, [{
     file=>'nolicense.c',
-    copyright=>['Copyright: 1992, 1993 The Regents of the University of California. All rights reserved'],
+    copyright=>['Copyright: 1992-1993 The Regents of the University of California.'],
 }]);
diff --git a/t/09-tty.t b/t/09-tty.t
index 0dccc9e..ae327aa 100644
--- a/t/09-tty.t
+++ b/t/09-tty.t
@@ -13,5 +13,5 @@ my @data = $LICENSECHECK->get_info('tty.c');
 cmp_deeply(\@data, [{
     file=>'tty.c',
     license=>'BSD-3-clause',
-    copyright=>['Copyright: 1992, 1993 The Regents of the University of California. All rights reserved.'],
+    copyright=>['Copyright: 1992-1993 The Regents of the University of California.'],
 }]);
diff --git a/t/17-rltty.t b/t/17-rltty.t
index 83ee161..3d9968e 100644
--- a/t/17-rltty.t
+++ b/t/17-rltty.t
@@ -13,7 +13,7 @@ Readonly my $RAW_DATA => $LICENSECHECK->get_info('rltty.c');
 Readonly my $DATUM => Debian::LicenseReconcile::CopyrightDatum->new($RAW_DATA->{copyright});
 isa_ok($DATUM, 'Debian::LicenseReconcile::CopyrightDatum');
 cmp_deeply($DATUM->as_hash, {
-    'Free Software Foundation, Inc' => methods(min=>1992,max=>2005,size=>14),
+    'Free Software Foundation, Inc.' => methods(min=>1992,max=>2005,size=>14),
 });
 
 my $filter = Debian::LicenseReconcile::Filter::Rules->new(
@@ -35,7 +35,7 @@ cmp_deeply(\@data, [{
     file=>'rltty.c',
     license=>'GPL-2+',
     test=>'Rules3',
-    copyright=>['Copyright: 1992-2005 Free Software Foundation, Inc'],
+    copyright=>['Copyright: 1992-2005 Free Software Foundation, Inc.'],
 }]);
 
 $filter = Debian::LicenseReconcile::Filter::Rules->new(
@@ -59,5 +59,5 @@ cmp_deeply(\@data, [{
     file=>'rltty.c',
     license=>'Apache-2.0',
     test=>'Rules4',
-    copyright=>['Copyright: 1992-2005 Free Software Foundation, Inc'],
+    copyright=>['Copyright: 1992-2005 Free Software Foundation, Inc.'],
 }]);
diff --git a/t/20-copyright_extract.t b/t/20-copyright_extract.t
index b722328..1682851 100644
--- a/t/20-copyright_extract.t
+++ b/t/20-copyright_extract.t
@@ -14,8 +14,8 @@ cmp_deeply(\@data, [{
     file=>'copyright_extract1',
     license=>'GPL-2',
     copyright=>bag(
-        re('2007 Google Inc'),
-        re('2008 MySQL AB, 2008-2009 Sun Microsystems, Inc')
+        re('2007 Google Inc.'),
+        re('2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.')
     ),
 }]);
 
@@ -34,7 +34,7 @@ cmp_deeply(\@data, [{
     file=>'copyright_extract2',
     license=>'GPL-2',
     copyright=>[
-        'Copyright: 2008 MySQL AB, 2008-2009 Sun Microsystems, Inc'
+        'Copyright: 2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.'
     ],
 }]);
 
There is one remaining test failure:

Test Summary Report
-------------------
t/pod-coverage.t        (Wstat: 256 Tests: 14 Failed: 1)
  Failed test:  7
  Non-zero exit status: 1

I am unable to figure out how to fix it.

When running the test manually, it complain about missing coverage:

% perl -I`pwd`/lib t/pod-coverage.t 
1..14
ok 1 - Pod coverage on Debian::LicenseReconcile
ok 2 - Pod coverage on Debian::LicenseReconcile::Errors
ok 3 - Pod coverage on Debian::LicenseReconcile::CopyrightDatum
ok 4 - Pod coverage on Debian::LicenseReconcile::Utils
ok 5 - Pod coverage on Debian::LicenseReconcile::FormatSpec
ok 6 - Pod coverage on Debian::LicenseReconcile::LicenseCheck
not ok 7 - Pod coverage on Debian::LicenseReconcile::App
#   Failed test 'Pod coverage on Debian::LicenseReconcile::App'
#   at /usr/share/perl5/Test/Pod/Coverage.pm line 133.
# Coverage for Debian::LicenseReconcile::App is 92.3%, with 1 naked subroutine:
#       suggest_stanzas
ok 8 - Pod coverage on Debian::LicenseReconcile::Filter
ok 9 - Pod coverage on Debian::LicenseReconcile::CopyrightTarget
ok 10 - Pod coverage on Debian::LicenseReconcile::CopyrightDatum::Holder
ok 11 - Pod coverage on Debian::LicenseReconcile::Filter::Rules
ok 12 - Pod coverage on Debian::LicenseReconcile::Filter::Shebang
ok 13 - Pod coverage on Debian::LicenseReconcile::Filter::Std
ok 14 - Pod coverage on Debian::LicenseReconcile::Filter::ChangeLog
# Looks like you failed 1 test of 14.
%

My problem is that Debian::LicenseReconcile::App::suggest_stanzas isn't a subroutine,
it is a boolean variable.  I have no idea how to convince the coverage test that
it isn't supposed to have any coverage.  Or perhaps I completly misunderstand how
this test work?

-- 
Happy hacking
Petter Reinholdtsen



More information about the pkg-perl-maintainers mailing list