Procházet zdrojové kódy

Dpkg::Index: fix get() and remove() methods

They were using non-existing get_by_keys() method instead of get_keys().
Roderich Schupp před 16 roky
rodič
revize
c0129f0214
2 změnil soubory, kde provedl 9 přidání a 2 odebrání
  1. 7 0
      debian/changelog
  2. 2 2
      scripts/Dpkg/Index.pm

+ 7 - 0
debian/changelog

@@ -1,3 +1,10 @@
+dpkg (1.15.5.4) UNRELEASED; urgency=low
+
+  * Fix Dpkg::Index::get() and remove(). Thanks to Roderich Schupp
+    <roderich.schupp@googlemail.com> for the patch. Closes: #558595
+
+ -- Raphael Hertzog <hertzog@debian.org>  Sun, 29 Nov 2009 18:15:16 +0100
+
 dpkg (1.15.5.3) unstable; urgency=low
 
   [ Raphael Hertzog ]

+ 2 - 2
scripts/Dpkg/Index.pm

@@ -262,7 +262,7 @@ Returns all the items that matches all the criteria.
 
 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 @@ Returns and removes all the items that matches all the criteria.
 
 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;