Package: libapt-pkg-perl
Version: 0.1.29+b2
Severity: normal

Hello,

It looks like (according to a brief grep through the source) AptPkg hasn't been 
updated since dpkg gained triggers.

    root@narrows:/home/michael# dpkg -l libc6 libc-bin
    Desired=Unknown/Install/Remove/Purge/Hold
    | 
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name                                                 Version            
             Architecture                    Description
    
+++-====================================================-===============================-===============================-==============================================================================================================
    it  libc-bin                                             2.19-18+deb8u7     
             i386                            GNU C Library: Binaries
    ii  libc6:i386                                           2.19-18+deb8u7     
             i386                            GNU C Library: Shared libraries

    root@narrows:/home/michael# cat test
    #!/usr/bin/perl -w

    use strict;
    use AptPkg::Cache;

    my $cache=AptPkg::Cache->new;

    my @packages=qw/libc6 libc-bin/;
    my $package='libc-bin';

    foreach my $package (@packages) {
        my $info=$cache->{$package};

        my $version=$info->{CurrentVer}{VerStr} or die "$package has no 
CurrentVer (is it even installed?)";
        print "$package is version $version\n";
        my $state=$info->{CurrentState} or die "$package has no CurrentState 
(wat)";
        print "$package is in state $state\n";
    }

    root@narrows:/home/michael# dpkg -l libc6 libc-bin
    Desired=Unknown/Install/Remove/Purge/Hold
    | 
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name                                                 Version            
             Architecture                    Description
    
+++-====================================================-===============================-===============================-==============================================================================================================
    it  libc-bin                                             2.19-18+deb8u7     
             i386                            GNU C Library: Binaries
    ii  libc6:i386                                           2.19-18+deb8u7     
             i386                            GNU C Library: Shared libraries
    root@narrows:/home/michael# ./test
    libc6 is version 2.19-18+deb8u7
    libc6 is in state Installed
    libc-bin is version 2.19-18+deb8u7
    libc-bin has no CurrentState (wat) at ./test line 16.

Setting Dpkg::NoTriggers may help make reproducing this bug easier.

The (untested!) beginnings of a suitable patch (which fixes only my problem)
is attached.  I'm also tempted to suggest that perhaps it would be better to
return "Other" or "Unknown" instead of undef for unknown CurrentState
values, but of course that's not my call. :)

-- System Information:
Debian Release: 8.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'oldstable-updates'), (500, 
'stable'), (500, 'oldstable'), (487, 'testing-updates'), (487, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libapt-pkg-perl depends on:
ii  libapt-pkg4.12              1.0.9.8.4
ii  libc6                       2.19-18+deb8u7
ii  libgcc1                     1:4.9.2-10
ii  libstdc++6                  4.9.2-10
ii  perl-base [perlapi-5.20.0]  5.20.2-3+deb8u6

libapt-pkg-perl recommends no packages.

libapt-pkg-perl suggests no packages.

-- no debconf information

Reply via email to