The following commit has been merged in the master branch:
commit 7e856060484c653b054726b1523a3ed3745e47ce
Author: Guillem Jover <[email protected]>
Date:   Mon Dec 17 17:30:24 2012 +0100

    Dpkg::Control::Hash: Fix set_options to take a hash instead of two scalars
    
    This fixes the function to behave as documented, and expected from the
    name itself.

diff --git a/debian/changelog b/debian/changelog
index 78d1117..5d97c96 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -82,6 +82,8 @@ dpkg (1.17.0) UNRELEASED; urgency=low
   * Only ignore older packages if the existing version is informative. This
     allows any program using libdpkg to parse the available file to see again
     packages with versions lesser than 0-0 (like 0~0-0). Closes: #676664
+  * Fix Dpkg::Control::Hash set_options() to take a hash as argument instead
+    of two scalars.
 
   [ Updated manpages translations ]
   * Fix incorrect translation of "fortify" in French manpage for 
dpkg-buildflags
diff --git a/scripts/Dpkg/Control/Hash.pm b/scripts/Dpkg/Control/Hash.pm
index 038ac53..ed7587d 100644
--- a/scripts/Dpkg/Control/Hash.pm
+++ b/scripts/Dpkg/Control/Hash.pm
@@ -136,8 +136,8 @@ Changes the value of one or more options.
 =cut
 
 sub set_options {
-    my ($self, $k, $v) = @_;
-    $$self->{$k} = $v;
+    my ($self, %opts) = @_;
+    $$self->{$_} = $opts{$_} foreach keys %opts;
 }
 
 =item my $value = $c->get_option($option)

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to