Bug#911769: libdebian-source-perl: dependencies with :$arch qualifiers

gregor herrmann gregoa at debian.org
Wed Oct 24 16:33:14 BST 2018


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


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.


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: Bob Dylan: Highlands
-------------- 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/20181024/8fd697c3/attachment.sig>


More information about the pkg-perl-maintainers mailing list