[libchi-perl] 01/06: Add patch from CPAN RT for compatibility with Cache::FastMmap >= 1.45.

gregor herrmann gregoa at debian.org
Mon Jul 31 18:43:58 UTC 2017


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libchi-perl.

commit 5338f8bdf495d32bbd25fca8dbb2c24a08bf9def
Author: gregor herrmann <gregoa at debian.org>
Date:   Mon Jul 31 14:38:45 2017 -0400

    Add patch from CPAN RT for compatibility with Cache::FastMmap >= 1.45.
    
    Closes: #870235
---
 ...1-Adapt-to-changes-in-Cache-FastMmap-1.45.patch | 67 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 68 insertions(+)

diff --git a/debian/patches/0001-Adapt-to-changes-in-Cache-FastMmap-1.45.patch b/debian/patches/0001-Adapt-to-changes-in-Cache-FastMmap-1.45.patch
new file mode 100644
index 0000000..f1a382f
--- /dev/null
+++ b/debian/patches/0001-Adapt-to-changes-in-Cache-FastMmap-1.45.patch
@@ -0,0 +1,67 @@
+From 8513c82bca186a9c724fe9c9b44ccbac062793d8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Wed, 3 May 2017 16:57:52 +0200
+Subject: [PATCH] Adapt to changes in Cache-FastMmap-1.45
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Cache-FastMmap-1.45 deprecated raw_values constructor argument in
+favor of new serializer argument. This changes caused
+t/smoke-Driver-CacheCache.t to fail.
+
+This patch uses serializer with Cache::FastMmap >= 1.45, otherwise the old
+raw_values.
+
+CPAN RT#120705
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+
+Bug-Debian: https://bugs.debian.org/870235
+
+---
+ lib/CHI/Driver/FastMmap.pm   | 10 +++++++---
+ lib/CHI/t/Driver/FastMmap.pm |  6 +++++-
+ 2 files changed, 12 insertions(+), 4 deletions(-)
+
+--- a/lib/CHI/Driver/FastMmap.pm
++++ b/lib/CHI/Driver/FastMmap.pm
+@@ -21,7 +21,11 @@
+     mkpath( $self->root_dir, 0, $self->dir_create_mode )
+       if !-d $self->root_dir;
+     $self->{fm_params} = {
+-        raw_values     => 1,
++        (
++            ($Cache::FastMmap::VERSION >= 1.45) ?
++            (serializer     => '') :
++            (raw_values     => 1)
++        ),
+         unlink_on_exit => 0,
+         share_file     => catfile(
+             $self->root_dir,
+@@ -107,8 +111,8 @@
+ To support namespaces, this driver takes a directory parameter rather than a
+ file, and creates one Cache::FastMMap file for each namespace.
+ 
+-Because CHI handles serialization automatically, we pass the C<raw_values> flag
+-as 1; and to conform to the CHI API, we pass C<unlink_on_exit> as 0, so that
++Because CHI handles serialization automatically, we pass the C<serializer> flag
++as ''; and to conform to the CHI API, we pass C<unlink_on_exit> as 0, so that
+ all cache files are permanent.
+ 
+ =head1 REQUIREMENTS
+--- a/lib/CHI/t/Driver/FastMmap.pm
++++ b/lib/CHI/t/Driver/FastMmap.pm
+@@ -35,7 +35,11 @@
+     my %defaults = (
+         unlink_on_exit => 0,
+         empty_on_exit  => 0,
+-        raw_values     => 1,
++        (
++            ($Cache::FastMmap::VERSION >= 1.45) ?
++            (serialize      => 0) :
++            (raw_values     => 1)
++        ),
+     );
+     while ( my ( $key, $value ) = each(%defaults) ) {
+         is( $fm_cache->{$key} || 0, $value, "$key = $value by default" );
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7935852
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Adapt-to-changes-in-Cache-FastMmap-1.45.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libchi-perl.git



More information about the Pkg-perl-cvs-commits mailing list