LP#1527731: Stablize eg_cache_hash key used for autogen (and other) cache busting user/miker/lp-1527731-stable_hash_keys
authorMike Rylander <mrylander@gmail.com>
Thu, 24 Aug 2017 14:39:44 +0000 (10:39 -0400)
committerMike Rylander <mrylander@gmail.com>
Thu, 24 Aug 2017 14:39:44 +0000 (10:39 -0400)
Because of the way Perl after 5.18 randomizes internal hash keys and key
retrieval order, each run of autogen.sh produces a different key.  What we want
is the same key for the same data on the same day, regardless of anything else.
So, here we tell Perl to use a repeatable hash key order.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/extras/autogen.sh

index 37c9d90..7c8e6bc 100755 (executable)
@@ -74,6 +74,9 @@ SKINDIR='LOCALSTATEDIR/web/opac/skin';
 COMPRESSOR="" # TODO: set via ./configure
 #COMPRESSOR="java -jar /opt/yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar"
 
+# So that we get the same cache key on any machine during the same day.
+export PERL_HASH_SEED=0
+
 echo "Updating Evergreen organization tree and IDL"
 echo ""