Bug#905614: FTBFS: Failed test 'no warnings' with libsoftware-license-perl 0.103013-2
gregor herrmann
gregoa at debian.org
Tue Aug 7 13:52:50 BST 2018
On Tue, 07 Aug 2018 07:01:15 +0000, Damyan Ivanov wrote:
> Package: license-reconcile
> Version: 0.15
> Severity: serious
>
> license-reconcile fails to build with libsoftware-license-perl 0.103013-2 or
> later because of failing tests:
>
> # Failed test 'no warnings'
> # at /usr/share/perl/5.28/Test/Builder.pm line 158.
> # There were 12 warning(s)
> # Previous test 0 ''
> # debian_text method is deprecated. Please use summary_or_text methodfrom Software::LicenseMoreUtils at t/08-licensecheck.t line 57.
> # at /usr/share/perl5/Software/License.pm line 96, <DATA> line 6.
> # Software::License::debian_text(Software::License::Apache_2_0=HASH(0x55ba508b14c0)) called at t/08-licensecheck.t line 57
> #
> ...
>
> This seems to be caused by the add-debian-text-method patch, part of
> libsoftware-license-perl since 0.103013-2.
>
> Full build logs can be seen on
> https://ci.debian.net/packages/l/license-reconcile/
I had a look at this, but either I don't understand the
Software::License* modules not well enough, or there's something
weird going on.
With the following patch (also in git):
#v+
--- a/t/08-licensecheck.t
+++ b/t/08-licensecheck.t
@@ -6,7 +6,7 @@ use Test::NoWarnings;
use Debian::LicenseReconcile::LicenseCheck;
use Readonly;
use File::Temp qw();
-use Software::License;
+use Software::LicenseMoreUtils;
use Data::Dumper;
require UNIVERSAL::require;
@@ -46,15 +46,14 @@ my $dir = File::Temp->newdir('t/slgenXXXXX');
my $year = 2000;
foreach my $license (@LICENSES) {
my $slfile = $dir->dirname . "/$license";
- my $module = "Software::License::$license";
- $module->require;
- my $slobj = $module->new({
+ my $slobj = Software::LicenseMoreUtils->new_from_short_name({
holder => 'Testophilus Testownik <tester at testity.org>',
year=>$year,
+ short_name => $license,
});
open my $fh, '>', $slfile;
print $fh $slobj->notice;
- print $fh $slobj->debian_text;
+ print $fh $slobj->summary_or_text;
close $fh;
++$year;
}
#v-
the tests kind of work, except that they fail for all licenses which
don't have a debian short text; for them the copyright line is
duplicated, as can be seen in the dumped @data in the test, and also
in the generated temp files:
#v+
# Failed test at t/08-licensecheck.t line 84.
# Comparing $data as a Bag
# Missing: 4 references
# Extra: 4 references
# Looks like you failed 1 test of 3.
t/08-licensecheck.t .......
1..3
ok 1 - An object of class 'Debian::LicenseReconcile::LicenseCheck' isa 'Debian::LicenseReconcile::LicenseCheck'
$VAR1 = {
'license' => 'test10',
'copyright' => [
'Copyright: 2009 Testophilus Testownik <tester at testity.org>.'
],
'file' => 'Mozilla_2_0'
};
$VAR2 = {
'copyright' => [
'Copyright: 2008 Testophilus Testownik <tester at testity.org>.',
'2008 Testophilus Testownik <tester at testity.org>.'
],
'license' => 'test9',
'file' => 'MIT'
};
$VAR3 = {
'copyright' => [
'Copyright: 2006 Testophilus Testownik <tester at testity.org>.'
],
'license' => 'test7',
'file' => 'LGPL_2_1'
};
$VAR4 = {
'copyright' => [
'Copyright: 2011 Testophilus Testownik <tester at testity.org>.',
'2011 Testophilus Testownik <tester at testity.org>.'
],
'license' => 'test12',
'file' => 'Zlib'
};
$VAR5 = {
'copyright' => [
'Copyright: 2003 Testophilus Testownik <tester at testity.org>.'
],
'license' => 'test4',
'file' => 'GPL_2'
};
$VAR6 = {
'file' => 'GPL_1',
'license' => 'test3',
'copyright' => [
'Copyright: 2002 Testophilus Testownik <tester at testity.org>.'
]
};
$VAR7 = {
'file' => 'LGPL_2',
'copyright' => [
'Copyright: 2005 Testophilus Testownik <tester at testity.org>.'
],
'license' => 'test6'
};
$VAR8 = {
'copyright' => [
'Copyright: 2007 Testophilus Testownik <tester at testity.org>.'
],
'license' => 'test8',
'file' => 'LGPL_3_0'
};
$VAR9 = {
'license' => 'test11',
'copyright' => [
'Copyright: 2010 Testophilus Testownik <tester at testity.org>.',
'2010 Testophilus Testownik <tester at testity.org>.'
],
'file' => 'QPL_1_0'
};
$VAR10 = {
'file' => 'GPL_3',
'license' => 'test5',
'copyright' => [
'Copyright: 2004 Testophilus Testownik <tester at testity.org>.'
]
};
$VAR11 = {
'file' => 'FreeBSD',
'copyright' => [
'Copyright: 2001 Testophilus Testownik <tester at testity.org>.',
'2001 Testophilus Testownik <tester at testity.org>.'
],
'license' => 'test2'
};
$VAR12 = {
'copyright' => [
'Copyright: 2000 Testophilus Testownik <tester at testity.org>.'
],
'license' => 'test1',
'file' => 'Apache_2_0'
};
not ok 2
ok 3 - no warnings
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests
#v-
I hope that dod can say if I'm using Software::LicenseMoreUtils
incorrectly or if there's something strange wrt debian-short-licenses
vs. others going on ...
Cheers,
gregor
--
.''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.org
: :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06
`. `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
`- NP: Kings of Convenience: Riot On An Empty Street
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: Digital Signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-perl-maintainers/attachments/20180807/ca1cffae/attachment.sig>
More information about the pkg-perl-maintainers
mailing list