1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
From d4abae7e6193bfda67526994c03a02679b2c364d Mon Sep 17 00:00:00 2001
From: Niko Tyni <ntyni@debian.org>
Date: Fri, 28 Aug 2015 11:39:48 +0300
Subject: [PATCH] Store the generated character mapping database in a
reproducible way
The $Storable::canonical setting makes Storable sort hashes by their
key when storing them. This makes the generated table reproducible
between builds.
---
lib/MARC/Charset/Table.pm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/MARC/Charset/Table.pm b/lib/MARC/Charset/Table.pm
index e23e70f..40e190e 100644
--- a/lib/MARC/Charset/Table.pm
+++ b/lib/MARC/Charset/Table.pm
@@ -38,6 +38,9 @@ BEGIN {
@AnyDBM_File::ISA = qw(GDBM_File DB_File NDBM_File ODBM_File SDBM_File);
# SDBM_File is last on the list because it produces the largest database
# on disk.
+
+ $Storable::canonical = 1;
+ # try to keep the generated database reproducible
}
use AnyDBM_File;
use MARC::Charset::Code;
--
2.1.4
|