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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
Origin: vendor
Bug-Debian: https://bugs.debian.org/796155
Forwarded: no
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2015-08-20
From: Niko Tyni <ntyni@debian.org>
Date: Wed, 19 Aug 2015 23:07:54 +0300
Subject: [PATCH] Make the Storable databases reproducible
.
We set $Storable::canonical to make sure the hash keys are
ordered in the Storable structures, and sort the keys
when creating lists.
--- a/data/chantler2st.PL
+++ b/data/chantler2st.PL
@@ -35,6 +35,7 @@
use strict;
use Storable qw/nstore/;
+$Storable::canonical = 1;
## use Data::Dumper;
use File::Spec;
use Chemistry::Elements qw(get_symbol);
@@ -136,7 +137,7 @@
print " Getting energy list keys ... ";
my @energy_list = ();
-foreach my $key (keys %chantler) {
+foreach my $key (sort keys %chantler) {
next if ($key eq "version");
next if ($key eq "nu");
foreach my $s ("k" , "l1", "l2", "l3", "m1", "m2", "m3", "m4", "m5",
--- a/data/cl2st.PL
+++ b/data/cl2st.PL
@@ -40,6 +40,7 @@
use strict;
use Storable qw/nstore/;
+$Storable::canonical = 1;
## use Data::Dumper;
use File::Spec;
use Chemistry::Elements qw(get_symbol);
@@ -124,7 +125,7 @@
print "$/ Getting energy list keys ... ";
my @energy_list = ();
-foreach my $key (keys %cl) {
+foreach my $key (sort keys %cl) {
next if ($key eq "version");
next if ($key eq "nu");
foreach my $s ("k" , "l1", "l2", "l3", "m1", "m2", "m3", "m4", "m5",
--- a/data/dat2st.PL
+++ b/data/dat2st.PL
@@ -27,6 +27,7 @@
use strict;
use Storable qw/nstore/;
+$Storable::canonical = 1;
use File::Spec;
my $cvs_info = '$Id: dat2st.PL,v 1.1 1999/05/20 17:47:43 bruce Exp $ ';
--- a/data/elam2st.PL
+++ b/data/elam2st.PL
@@ -189,6 +189,7 @@
use strict;
use Storable qw/nstore/;
+$Storable::canonical = 1;
## use Data::Dumper;
use File::Spec;
@@ -329,7 +330,7 @@
print " Getting energy list keys ... ";
my @energy_list = ();
-foreach my $key (keys %elam) {
+foreach my $key (sort keys %elam) {
next if ($key eq "version");
next if ($key eq "date");
next if ($key eq "nu");
@@ -368,7 +369,7 @@
print " Getting line list keys ... ";
my @line_list = ();
-foreach my $key (keys %elam) {
+foreach my $key (sort keys %elam) {
next if ($key eq "version");
next if ($key eq "date");
next if ($key eq "nu");
--- a/data/henke2st.PL
+++ b/data/henke2st.PL
@@ -32,6 +32,7 @@
use strict;
use Storable qw/nstore/;
+$Storable::canonical = 1;
## use Data::Dumper;
use File::Spec;
use Chemistry::Elements qw(get_symbol);
@@ -111,7 +112,7 @@
print " Getting energy list keys ... ";
my @energy_list = ();
-foreach my $key (keys %henke) {
+foreach my $key (sort keys %henke) {
next if ($key eq "version");
next if ($key eq "nu");
foreach my $s ("k" , "l1", "l2", "l3", "m1", "m2", "m3", "m4", "m5",
--- a/data/hubbell_g2st.PL
+++ b/data/hubbell_g2st.PL
@@ -16,6 +16,7 @@
use Chemistry::Elements qw(get_symbol);
use File::Spec;
use Storable qw/nstore/;
+$Storable::canonical = 1;
#use Data::Dumper;
my $version = qv("0.2.0");
--- a/data/shalt2st.PL
+++ b/data/shalt2st.PL
@@ -27,6 +27,7 @@
use strict;
use Chemistry::Elements qw(get_symbol);
use Storable qw(nstore);
+$Storable::canonical = 1;
use Fatal qw(open close);
use File::Spec;
|