r24443 - in /trunk/libmarc-charset-perl/debian/patches: ./ gdbm.patch series

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Fri Aug 22 06:09:09 UTC 2008


Author: dmn
Date: Fri Aug 22 06:08:59 2008
New Revision: 24443

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=24443
Log:
add gdbm.patch by Niko Tyni

Converts the database from 400MB SDBM to a few megabytes GDBM,
addressing #481505

Added:
    trunk/libmarc-charset-perl/debian/patches/
    trunk/libmarc-charset-perl/debian/patches/gdbm.patch
    trunk/libmarc-charset-perl/debian/patches/series

Added: trunk/libmarc-charset-perl/debian/patches/gdbm.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmarc-charset-perl/debian/patches/gdbm.patch?rev=24443&op=file
==============================================================================
--- trunk/libmarc-charset-perl/debian/patches/gdbm.patch (added)
+++ trunk/libmarc-charset-perl/debian/patches/gdbm.patch Fri Aug 22 06:08:59 2008
@@ -1,0 +1,38 @@
+--- a/lib/MARC/Charset/Table.pm
++++ b/lib/MARC/Charset/Table.pm
+@@ -34,7 +34,7 @@ UCS code point. These keys map to a seri
+ use strict;
+ use warnings;
+ use POSIX;
+-use SDBM_File;
++use GDBM_File;
+ use MARC::Charset::Code;
+ use MARC::Charset::Constants qw(:all);
+ use Storable qw(freeze thaw);
+@@ -49,7 +49,7 @@ sub new
+ {
+     my $class = shift;
+     my $self = bless {}, ref($class) || $class;
+-    $self->_init(O_RDONLY);
++    $self->_init(&GDBM_READER);
+     return $self;
+ }
+ 
+@@ -174,7 +174,7 @@ sub brand_new 
+ {
+     my $class = shift;
+     my $self = bless {}, ref($class) || $class;
+-    $self->_init(O_CREAT|O_RDWR);
++    $self->_init(&GDBM_WRCREAT);
+     return $self;
+ }
+ 
+@@ -184,7 +184,7 @@ sub brand_new 
+ sub _init 
+ {
+     my ($self,$opts) = @_;
+-    tie my %db, 'SDBM_File', db_path(), $opts, 0644;
++    tie my %db, 'GDBM_File', db_path(), $opts, 0644;
+     $self->{db} = \%db;
+ }
+ 

Added: trunk/libmarc-charset-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmarc-charset-perl/debian/patches/series?rev=24443&op=file
==============================================================================
--- trunk/libmarc-charset-perl/debian/patches/series (added)
+++ trunk/libmarc-charset-perl/debian/patches/series Fri Aug 22 06:08:59 2008
@@ -1,0 +1,1 @@
+gdbm.patch




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