Your message dated Sat, 15 Nov 2014 17:48:40 +0000
with message-id <1416073720.19889.0.ca...@adam-barratt.org.uk>
and subject line Re: Bug#769699: unblock: libcgi-formbuilder-perl/3.09-2
has caused the Debian Bug report #769699,
regarding unblock: libcgi-formbuilder-perl/3.09-2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
769699: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769699
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

Please unblock package libcgi-formbuilder-perl. This fixes #769240, a
regression introduced while fixing #766087 (use of dangerous/deprecated
API in CGI.pm, which causes warnings): some users of libcgi-formbuilder-perl
turn out to use it with an object that implements the deprecated part of the
CGI.pm interface, but not the replacement.

The source debdiff is hard to read because I combined three related
patches into one replacement patch, so the attached diff is between
the resulting patched trees for 3.09-1 and 3.09-2, excluding the patches
themselves. Please let me know if you'd prefer a different diff.

unblock libcgi-formbuilder-perl/3.09-2

Regards,
    S

-- System Information:
Debian Release: jessie/sid
  APT prefers proposed-updates
  APT policy: (500, 'proposed-updates'), (500, 'unstable'), (500, 'testing'), 
(500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -ru '--exclude=.pc' '--exclude=*.patch' libcgi-formbuilder-perl-3.09-1/debian/changelog libcgi-formbuilder-perl-3.09-2/debian/changelog
--- libcgi-formbuilder-perl-3.09-1/debian/changelog	2014-10-25 01:04:40.000000000 +0100
+++ libcgi-formbuilder-perl-3.09-2/debian/changelog	2014-11-15 14:58:41.000000000 +0000
@@ -1,3 +1,12 @@
+libcgi-formbuilder-perl (3.09-2) unstable; urgency=medium
+
+  [ Simon McVittie ]
+  * Merge patches 0005-0006 into 0004, and adapt to retain support for
+    objects that mimic the CGI.pm API but do not have param_fetch.
+    Closes: bug#769240. Thanks to Simon McVittie.
+
+ -- Jonas Smedegaard <d...@jones.dk>  Sat, 15 Nov 2014 15:58:40 +0100
+
 libcgi-formbuilder-perl (3.09-1) unstable; urgency=medium
 
   [ Salvatore Bonaccorso ]
diff -ru '--exclude=.pc' '--exclude=*.patch' libcgi-formbuilder-perl-3.09-1/debian/patches/series libcgi-formbuilder-perl-3.09-2/debian/patches/series
--- libcgi-formbuilder-perl-3.09-1/debian/patches/series	2014-10-25 00:58:09.000000000 +0100
+++ libcgi-formbuilder-perl-3.09-2/debian/patches/series	2014-11-15 14:50:04.000000000 +0000
@@ -1,6 +1,4 @@
 pod-encoding.patch
 pod-spelling.patch
 0004-Avoid-unneeded-warning-from-CGI.pm-4.05-or-newer.patch
-0005-Avoid-unneeded-warning-from-CGI.pm-4.05-or-newer.patch
-0006-Fix-another-use-of-param-that-will-cause-a-warning-i.patch
 0007-Comment-that-cgi_param-is-context-sensitive-just-lik.patch
diff -ru '--exclude=.pc' '--exclude=*.patch' libcgi-formbuilder-perl-3.09-1/lib/CGI/FormBuilder/Field.pm libcgi-formbuilder-perl-3.09-2/lib/CGI/FormBuilder/Field.pm
--- libcgi-formbuilder-perl-3.09-1/lib/CGI/FormBuilder/Field.pm	2014-11-15 16:41:38.000000000 +0000
+++ libcgi-formbuilder-perl-3.09-2/lib/CGI/FormBuilder/Field.pm	2014-11-15 16:41:48.000000000 +0000
@@ -189,7 +189,19 @@
     my $self = shift;
     debug 2, "$self->{name}: called \$field->cgi_value";
     puke "Cannot set \$field->cgi_value manually" if @_;
-    if (my @v = @{$self->{_form}{params}->param_fetch($self->name)}) {
+
+    my @v;
+    if ($self->{_form}{params}->can('param_fetch')) {
+        @v = @{$self->{_form}{params}->param_fetch($self->name)};
+    }
+    else {
+        # array-context calls to param($p) are deprecated in
+        # CGI.pm, but some other objects that mimic
+        # its interface don't have param_fetch
+        @v = $self->{_form}{params}->param($self->name);
+    }
+
+    if (@v) {
         for my $v (@v) {
             if ($self->other && $v eq $self->othername) {
                 debug 1, "$self->{name}: redoing value from _other field";
diff -ru '--exclude=.pc' '--exclude=*.patch' libcgi-formbuilder-perl-3.09-1/lib/CGI/FormBuilder/Multi.pm libcgi-formbuilder-perl-3.09-2/lib/CGI/FormBuilder/Multi.pm
--- libcgi-formbuilder-perl-3.09-1/lib/CGI/FormBuilder/Multi.pm	2014-11-15 16:41:38.000000000 +0000
+++ libcgi-formbuilder-perl-3.09-2/lib/CGI/FormBuilder/Multi.pm	2014-11-15 16:41:48.000000000 +0000
@@ -218,7 +218,19 @@
         }
         for my $k (@{$self->{keepextras}}) {
             next if $k eq $pnam;
-            for my $v (@{$self->{params}->param_fetch($k)}) {
+
+            my @values;
+            if ($self->{params}->can('param_fetch')) {
+                @values = @{$self->{params}->param_fetch($k)};
+            }
+            else {
+                # array-context calls to param($k) are deprecated in
+                # CGI.pm, but some other objects that mimic
+                # its interface don't have param_fetch
+                @values = $self->{params}->param($k);
+            }
+
+            for my $v (@values) {
                 push @keep, { name => $k, value => $v };
             }
         }
diff -ru '--exclude=.pc' '--exclude=*.patch' libcgi-formbuilder-perl-3.09-1/lib/CGI/FormBuilder.pm libcgi-formbuilder-perl-3.09-2/lib/CGI/FormBuilder.pm
--- libcgi-formbuilder-perl-3.09-1/lib/CGI/FormBuilder.pm	2014-11-15 16:41:38.000000000 +0000
+++ libcgi-formbuilder-perl-3.09-2/lib/CGI/FormBuilder.pm	2014-11-15 16:41:48.000000000 +0000
@@ -855,7 +855,18 @@
 
     # Make sure to get all values
     for my $p (@keep) {
-        for my $v (@{$self->{params}->param_fetch($p)}) {
+        my @values;
+        if ($self->{params}->can('param_fetch')) {
+            @values = @{$self->{params}->param_fetch($p)};
+        }
+        else {
+            # array-context calls to param($p) are deprecated in
+            # CGI.pm, but some other objects that mimic
+            # its interface don't have param_fetch
+            @values = $self->{params}->param($p);
+        }
+
+        for my $v (@values) {
             debug 1, "keepextras: saving hidden param $p = $v";
             push @html, htmltag('input', name => $p, type => 'hidden', value => $v);
         }

--- End Message ---
--- Begin Message ---
On Sat, 2014-11-15 at 16:56 +0000, Simon McVittie wrote:
> Please unblock package libcgi-formbuilder-perl. This fixes #769240, a
> regression introduced while fixing #766087 (use of dangerous/deprecated
> API in CGI.pm, which causes warnings): some users of libcgi-formbuilder-perl
> turn out to use it with an object that implements the deprecated part of the
> CGI.pm interface, but not the replacement.

Done a little earlier this evening when I spotted the bug closure;
thanks.

Regards,

Adam

--- End Message ---

Reply via email to