diff -Nru libconfig-model-dpkg-perl-2.164/debian/changelog libconfig-model-dpkg-perl-2.165/debian/changelog --- libconfig-model-dpkg-perl-2.164/debian/changelog 2022-09-08 13:43:47.000000000 +0000 +++ libconfig-model-dpkg-perl-2.165/debian/changelog 2023-01-21 18:25:38.000000000 +0000 @@ -1,3 +1,13 @@ +libconfig-model-dpkg-perl (2.165) unstable; urgency=medium + + * doc: fix fix.scanned.copyright file name (Closes: 1021772) + * Dpkg::Copyright: fix example to access File:* entry. + Thanks to Andreas Metzler for the bug report (Closes: 1021773) + * C::M::D::Dependency: fix test about @args size (Closes: 1023068) + * Scanner: fix code to find main license id + + -- Dominique Dumont Sat, 21 Jan 2023 19:25:38 +0100 + libconfig-model-dpkg-perl (2.164) unstable; urgency=medium * add support for package.docs files diff -Nru libconfig-model-dpkg-perl-2.164/lib/Config/Model/Dpkg/Copyright.pm libconfig-model-dpkg-perl-2.165/lib/Config/Model/Dpkg/Copyright.pm --- libconfig-model-dpkg-perl-2.164/lib/Config/Model/Dpkg/Copyright.pm 2022-09-08 13:43:47.000000000 +0000 +++ libconfig-model-dpkg-perl-2.165/lib/Config/Model/Dpkg/Copyright.pm 2023-01-21 18:25:38.000000000 +0000 @@ -516,9 +516,9 @@ Copyright: 2014-2015, Adam Kennedy "foobar License: Artistic or GPL-1+ -You may add this line in C file: +You may add this line in C file: - ! Files:'*' Copyright=~s/\s*".*// + ! Files:"*" Copyright=~s/\s*".*// This way, the copyright information will be updated from the file content but the extra C<"foobar> will always be removed during diff -Nru libconfig-model-dpkg-perl-2.164/lib/Config/Model/Dpkg/Dependency.pm libconfig-model-dpkg-perl-2.165/lib/Config/Model/Dpkg/Dependency.pm --- libconfig-model-dpkg-perl-2.164/lib/Config/Model/Dpkg/Dependency.pm 2022-09-08 13:43:47.000000000 +0000 +++ libconfig-model-dpkg-perl-2.165/lib/Config/Model/Dpkg/Dependency.pm 2023-01-21 18:25:38.000000000 +0000 @@ -341,7 +341,7 @@ # autoread started -> read all fileds -> read dependency -> check_dep ... around check_value => sub($orig, $self, @args) { - my %args = @_ > 1 ? @args : (value => $args[0]) ; + my %args = @args > 1 ? @args : (value => $args[0]) ; $args{fix} //= 0; # when fixing, $orig->() may modify $args{value} before calling back @@ -685,15 +685,17 @@ return (0,@list) ; } -# -# New subroutine "check_essential_package" extracted - Thu Aug 30 14:14:32 2012. -# sub check_or_fix_essential_package { my ( $self, $apply_fix, $dep_info, $msgs ) = @_; my $pkg = $dep_info->{name}; my ($oper, $vers) = @{ $dep_info->{dep} || []}; $logger->debug("called with '", scalar $self->struct_to_dep($dep_info), "' and fix $apply_fix") if $logger->is_debug; + if (not defined $pkg) { + # pkg may be cleaned up during fix + return; + } + # Remove unversioned dependency on essential package (Debian bug 684208) # see /usr/share/doc/libapt-pkg-perl/examples/apt-cache diff -Nru libconfig-model-dpkg-perl-2.164/lib/Dpkg/Copyright/Scanner.pm libconfig-model-dpkg-perl-2.165/lib/Dpkg/Copyright/Scanner.pm --- libconfig-model-dpkg-perl-2.164/lib/Dpkg/Copyright/Scanner.pm 2022-09-08 13:43:47.000000000 +0000 +++ libconfig-model-dpkg-perl-2.165/lib/Dpkg/Copyright/Scanner.pm 2023-01-21 18:25:38.000000000 +0000 @@ -218,10 +218,10 @@ $pipe->close or die $! ? "Error closing licensecheck pipe: $!\n" : "Exit status ".$?." $cmd\n"; } - return _trim_lines (\@lines, \%regexps); + return _parse_lines (\@lines, \%regexps); } -sub _trim_lines ($lines, $regexps) { +sub _parse_lines ($lines, $regexps) { my @kept_lines; my @skipped; foreach my $line (sort $lines->@*) { @@ -784,7 +784,7 @@ # check whether the new copyright/license already exists # before creating a new one - for (my $idx = 0; $idx < $#$copyrights_by_id; $idx++) { + for (my $idx = 0; $idx < $copyrights_by_id->@*; $idx++) { if (Compare($copyrights_by_id->[$idx], $new_data)) { return $idx; }