[open-ils-commits] r19099 - in branches/rel_1_6_2/Open-ILS/src: extras perlmods/OpenILS/Application/Storage (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Jan 4 10:26:32 EST 2011


Author: miker
Date: 2011-01-04 10:26:30 -0500 (Tue, 04 Jan 2011)
New Revision: 19099

Modified:
   branches/rel_1_6_2/Open-ILS/src/extras/Makefile.install
   branches/rel_1_6_2/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm
Log:
Patch from Robert Soulliere to backport Class::DBI version checking from 2.0: https://bugs.launchpad.net/evergreen/+bug/692717

Modified: branches/rel_1_6_2/Open-ILS/src/extras/Makefile.install
===================================================================
--- branches/rel_1_6_2/Open-ILS/src/extras/Makefile.install	2011-01-04 15:25:46 UTC (rev 19098)
+++ branches/rel_1_6_2/Open-ILS/src/extras/Makefile.install	2011-01-04 15:26:30 UTC (rev 19099)
@@ -229,6 +229,9 @@
     MARC::File::XML \
     Net::Z3950::ZOOM
 
+CPAN_MODULES_FORCE = \
+	Class::DBI::Frozen::301
+
 # ----------------------------------------------------------------------------
 
 all: 
@@ -267,6 +270,12 @@
 install_cpan_marc: 
 	for m in $(CPAN_MODULES_MARC); do perl -MCPAN -e "install \"$$m\";"; done
 
+# Force Install CPAN modules.
+install_cpan_force:
+	for m in $(CPAN_MODULES_FORCE); do \
+		echo "force install $$m" | perl -MCPAN -e shell ;\
+	done  
+
 # Install a known working version of YAZ
 install_yaz:    
 	if [ ! -d $(YAZ) ]; then wget $(YAZ_HOST)/$(YAZ).tar.gz; fi;

Modified: branches/rel_1_6_2/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm
===================================================================
--- branches/rel_1_6_2/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm	2011-01-04 15:25:46 UTC (rev 19098)
+++ branches/rel_1_6_2/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm	2011-01-04 15:26:30 UTC (rev 19099)
@@ -1,6 +1,10 @@
 package OpenILS::Application::Storage::CDBI;
+use UNIVERSAL::require;
+BEGIN {
+	'Class::DBI::Frozen::301'->use or 'Class::DBI'->use or die $@;
+}
+
 use base qw/Class::DBI/;
-use Class::DBI;
 use Class::DBI::AbstractSearch;
 
 use OpenILS::Application::Storage::CDBI::actor;
@@ -22,6 +26,10 @@
 our $VERSION = 1;
 my $log = 'OpenSRF::Utils::Logger';
 
+if ($Class::DBI::VERSION gt '3.0.1') {
+	$log->error("Your version of Class::DBI, $Class::DBI::VERSION, is too new and incompatible with Evergreen. You will need to downgrade to version 3.0.1 or install Class::DBI::Frozen::301");
+}
+
 sub child_init {
 	my $self = shift;
 



More information about the open-ils-commits mailing list