Package: dpkg-dev
Version: 1.15.5.3
Severity: normal
Tags: patch

This sample Perl script:

use strict;
use warnings;
use Dpkg::Control;
use Dpkg::Index;

my $index = Dpkg::Index->new(type => CTRL_INDEX_PKG);
$index->load("/var/lib/dpkg/status");

my @deinstall = $index->get(status => qr/^deinstall/);


produces:

Can't locate object method "get_by_keys" via package "Dpkg::Index" at 
/usr/share/perl5/Dpkg/Index.pm line 265.


Apparently get_by_keys got renamed to get_keys, but not alle callers where 
changed.
Patch attached.





-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-rc8 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dpkg-dev depends on:
ii  base-files        5.0.0                  Debian base system miscellaneous f
ii  binutils          2.20-4                 The GNU assembler, linker and bina
ii  bzip2             1.0.5-3                high-quality block-sorting file co
ii  dpkg              1.15.5.3               Debian package management system
ii  libtimedate-perl  1.1900-1               Time and date functions for Perl
ii  lzma              4.43-14                Compression method of 7z format in
ii  make              3.81-7                 An utility for Directing compilati
ii  patch             2.5.9-5                Apply a diff file to an original
ii  perl [perl5]      5.10.1-8               Larry Wall's Practical Extraction 
ii  perl-modules      5.10.1-8               Core Perl modules
ii  xz-utils          4.999.9beta+20091116-1 XZ-format compression utilities

Versions of packages dpkg-dev recommends:
ii  bcc [c-compiler]              0.16.17-3  16-bit x86 C compiler
ii  build-essential               11.4       Informational list of build-essent
ii  fakeroot                      1.14.4-1   Gives a fake root environment
ii  gcc [c-compiler]              4:4.3.4-1  The GNU C compiler
ii  gcc-4.3 [c-compiler]          4.3.4-6    The GNU C compiler
ii  gcc-4.4 [c-compiler]          4.4.2-3    The GNU C compiler
ii  gnupg                         1.4.10-2   GNU privacy guard - a free PGP rep
ii  gpgv                          1.4.10-2   GNU privacy guard - signature veri

Versions of packages dpkg-dev suggests:
ii  debian-keyring [debian-mainta 2009.11.04 GnuPG (and obsolete PGP) keys of D

-- no debconf information
--- dpkg-1.15.5.3-ORIG/scripts/Dpkg/Index.pm    2009-11-29 14:22:51.000000000 
+0100
+++ dpkg-1.15.5.3/scripts/Dpkg/Index.pm 2009-11-29 14:23:18.000000000 +0100
@@ -262,7 +262,7 @@
 
 sub get {
     my ($self, %crit) = @_;
-    return map { $self->{'items'}{$_} } $self->get_by_keys(%crit);
+    return map { $self->{'items'}{$_} } $self->get_keys(%crit);
 }
 
 =item $index->remove_by_key($key)
@@ -285,7 +285,7 @@
 
 sub remove {
     my ($self, %crit) = @_;
-    my @keys = $self->get_by_keys(%crit);
+    my @keys = $self->get_keys(%crit);
     my (%keys, @ret);
     foreach my $key (@keys) {
        $keys{$key} = 1;

Reply via email to