Test for an installed libdbi0 package and bail on Ubuntu and Debian
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 18 Mar 2011 17:50:19 +0000 (17:50 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 18 Mar 2011 17:50:19 +0000 (17:50 +0000)
This isn't a problem on Fedora, where we use the packaged version of libdbi,
but the older version of libdbi0 and possibly the compile options on Ubuntu
Lucid has been demonstrated to be a barrier to successfully installing
Evergreen.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19809 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/extras/Makefile.install

index fef69ef..0be07fc 100644 (file)
@@ -277,13 +277,13 @@ debian-lenny: lenny generic_debian install_cpan_more install_cpan_safe
 debian-squeeze: squeeze generic_debian
 lenny: install_pgsql_client_debs_83 install_extra_debs
 squeeze: install_pgsql_client_debs_84  install_extra_debs_squeeze
-generic_debian:  install_debs install debian_sys_config install_cpan_force
+generic_debian:  install_debs test_for_libdbi_pkg install debian_sys_config install_cpan_force
 
 ubuntu-hardy: hardy generic_ubuntu
 ubuntu-lucid: lucid generic_ubuntu
 hardy: install_pgsql_client_debs_82 install_yaz install_cpan_marc install_extra_encode
 lucid: install_pgsql_client_debs_84 install_extra_debs
-generic_ubuntu: install_debs install debian_sys_config install_cpan_more install_cpan_safe install_cpan_force
+generic_ubuntu: install_debs test_for_libdbi_pkg install debian_sys_config install_cpan_more install_cpan_safe install_cpan_force
 
 # - COMMON TARGETS ---------------------------------------------------------
 
@@ -344,6 +344,20 @@ install_spidermonkey:
        fi;
        cd $(LIBJS_PERL) && perl Makefile.PL -E4X -JS_THREADSAFE && make && make test && make install
 
+# On Ubuntu and possibly Debian, the libdbi0 package prevents the 
+# compiled-from-source version from being used and breaks the install.
+# This package might get installed depending on the install-time choices
+# for the distro. Test for its existence; if it's there, throw an error
+# message and exit.
+test_for_libdbi_pkg:
+               @if [ "$$(apt-cache policy libdbi0 | grep Installed | grep none | wc -l)" -eq 0 ]; then \
+                               echo "*** Detected locally installed libdbi0 package; you must remove this"; \
+                               echo "*** with a command like 'aptitude remove libdbi0' before proceeding"; \
+                               echo "*** to successfully install Evergreen."; \
+                               echo; \
+                               echo "*** Note: this may break other applications on your system."; \
+                               exit 0; \
+               fi;
 
 # Install libdbi and the postgres drivers
 install_libdbi: