On Wed, 24 Oct 2018 17:33:14 +0200, gregor herrmann wrote: > On Wed, 24 Oct 2018 17:25:27 +0200, gregor herrmann wrote: > > Unfortunately this issue is not caught by the test suite; maybe > > someone can review the patch-to-be-pushed and/or come up with a test. > > Or not. With my simple patch, the test suite fails: > > # prove --blib --verbose t/DpkgLists.t > t/DpkgLists.t .. > 1..7 > ok 1 - use Debian::DpkgLists; > # Perl API is 5.26 > ok 2 - /usr/bin/perl is in perl-base > ok 3 - partial /bin/perl is in perl-base > ok 4 - qr{/bin/perl$} is in perl-base > not ok 5 - Errno is in perl-base > > # Failed test 'Errno is in perl-base' > # at t/DpkgLists.t line 36. > # Structures begin differing at: > # $got->[0] = 'libperl5.26' > # $expected->[0] = 'libperl5.26:amd64' > not ok 6 - IO::Socket::UNIX is in perl-base > > # Failed test 'IO::Socket::UNIX is in perl-base' > # at t/DpkgLists.t line 42. > # Structures begin differing at: > # $got->[0] = 'libperl5.26' > # $expected->[0] = 'libperl5.26:amd64' > ok 7 - utf8 is in perl-base > # Looks like you failed 2 tests of 7. > Dubious, test returned 2 (wstat 512, 0x200) > Failed 2/7 subtests > > Test Summary Report > ------------------- > t/DpkgLists.t (Wstat: 512 Tests: 7 Failed: 2) > Failed tests: 5-6 > Non-zero exit status: 2 > Files=1, Tests=7, 0 wallclock secs ( 0.04 usr 0.00 sys + 0.20 cusr 0.01 > csys = 0.25 CPU) > Result: FAIL
A little more debugging: This seems to happen for arch:any packages with Multi-Arch:same, as they install /var/lib/dpkg/info/*:$arch.list files. > The patch I tried, which strips :$arch and does so also for > 'libperl5.26:amd64': > > --- a/lib/Debian/DpkgLists.pm > +++ b/lib/Debian/DpkgLists.pm > @@ -38,8 +38,9 @@ sub _cat_lists > my ( $class, $callback ) = @_; > while ( defined( my $f = </var/lib/dpkg/info/*.list> ) ) { > my $pkg = $f; > + # e.g. /var/lib/dpkg/info/libdbi-perl:amd64.list > $pkg =~ s{^/var/lib/dpkg/info/}{}; > - $pkg =~ s/\.list$//; > + $pkg =~ s/(?::\w+)?\.list$//; > open my $fh, '<', $f or die "open($f): $!\n"; > while ( defined( my $l = <$fh> ) ) { > chomp $l; > > > Looks like this needs more thought and eyeballs. Now the question is if this patch might be ok after all, and the test is wrong, which expects libperl5.28:amd64 … For all reverse-depends of libperl5.28, I only see 'libperl5.28' in Depends, and never 'libperl5.28:amd64' … 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: Schmetterlinge: Supermarkt-Song
signature.asc
Description: Digital Signature