Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libchi-perl
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian Perl Group
modules
packages
libchi-perl
Commits
5338f8bd
Commit
5338f8bd
authored
7 years ago
by
gregor herrmann
Browse files
Options
Downloads
Patches
Plain Diff
Add patch from CPAN RT for compatibility with Cache::FastMmap >= 1.45.
Closes: #870235
parent
d266c97b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/0001-Adapt-to-changes-in-Cache-FastMmap-1.45.patch
+67
-0
67 additions, 0 deletions
...atches/0001-Adapt-to-changes-in-Cache-FastMmap-1.45.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
68 additions
and
0 deletions
debian/patches/0001-Adapt-to-changes-in-Cache-FastMmap-1.45.patch
0 → 100644
+
67
−
0
View file @
5338f8bd
From 8513c82bca186a9c724fe9c9b44ccbac062793d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@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@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" );
This diff is collapsed.
Click to expand it.
debian/patches/series
0 → 100644
+
1
−
0
View file @
5338f8bd
0001-Adapt-to-changes-in-Cache-FastMmap-1.45.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment