Proceed with caution on the Squeeze backport repo
authorDan Scott <dscott@laurentian.ca>
Tue, 10 Jan 2012 21:02:24 +0000 (16:02 -0500)
committerDan Scott <dscott@laurentian.ca>
Sun, 4 Mar 2012 05:40:52 +0000 (00:40 -0500)
When installing on Debian Squeeze, use the same "-P" flag to prompt for
removal of the PostgreSQL 8.* packages now that we're pointing at the
9.1 backport. Create a new target to avoid trampling on Precise
Pangolin's nice, clean 9.1 target.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/extras/Makefile.install

index 784690a..463d37e 100644 (file)
@@ -98,7 +98,6 @@ DEBS =  \
        libnspr4-dev\
        libole-storage-lite-perl\
        libparent-perl \
        libnspr4-dev\
        libole-storage-lite-perl\
        libparent-perl \
-       libpq-dev\
        libreadline5-dev\
        libspreadsheet-writeexcel-perl\
        libssh2-1-dev\
        libreadline5-dev\
        libspreadsheet-writeexcel-perl\
        libssh2-1-dev\
@@ -319,7 +318,7 @@ centos_like: install_centos_rpms install_yaz install_cpan_marc install install_c
 fedora16: install_fedora_rpms install_cpan_fedora install_cpan_marc install
 
 debian-squeeze: squeeze generic_debian
 fedora16: install_fedora_rpms install_cpan_fedora install_cpan_marc install
 
 debian-squeeze: squeeze generic_debian
-squeeze: install_pgsql_client_debs_91  install_extra_debs_squeeze
+squeeze: install_pgsql_client_backport_debs_91  install_extra_debs_squeeze
 generic_debian: install_debs install_yaz test_for_libdbi_pkg install debian_sys_config install_libdbi
 
 # Needs for Ubuntu Lucid Lynx (10.04 LTS):
 generic_debian: install_debs install_yaz test_for_libdbi_pkg install debian_sys_config install_libdbi
 
 # Needs for Ubuntu Lucid Lynx (10.04 LTS):
@@ -468,7 +467,7 @@ install_debs:
        $(APT_TOOL) install $(DEBS)
 
 install_pgsql_client_debs_90:
        $(APT_TOOL) install $(DEBS)
 
 install_pgsql_client_debs_90:
-       @if [ `$(APT_TOOL) versions libpq-dev | grep ^i|sed 's/^i[ \t]*//'|cut -d. -f1` -eq 8 ]; \
+       @if [ `$(APT_TOOL) versions libpq5 | grep ^i|sed 's/^i[ \t]*//'|cut -d. -f1` -eq 8 ]; \
                then \
                echo -e "libpq5 / libpq-dev are installed as part of OpenSRF (a dependency" \
                "of apache2-prefork-dev), but these are the 8.4 versions and they" \
                then \
                echo -e "libpq5 / libpq-dev are installed as part of OpenSRF (a dependency" \
                "of apache2-prefork-dev), but these are the 8.4 versions and they" \
@@ -484,6 +483,20 @@ install_pgsql_client_debs_90:
 install_pgsql_server_debs_90:
        $(APT_BACKPORT_TOOL) install $(PGSQL_SERVER_DEBS_90)
 
 install_pgsql_server_debs_90:
        $(APT_BACKPORT_TOOL) install $(PGSQL_SERVER_DEBS_90)
 
+install_pgsql_client_backport_debs_91:
+       @if [ `$(APT_TOOL) versions libpq5 | grep ^i|sed 's/^i[ \t]*//'|cut -d. -f1` -eq 8 ]; \
+               then \
+               echo -e "libpq5 / libpq-dev are installed as part of OpenSRF (a dependency" \
+               "of apache2-prefork-dev), but these are the 8.4 versions and they" \
+               "conflict with the 9.0 versions - so remove them, install the pinned" \
+               "backports of 9.0, then reinstall the apache2-prefork-dev package.\n\n" \
+               "**WARNING**: Saying 'Yes' to this step will _remove_ any PostgreSQL" \
+               "databases that might currently exist on this machine." && \
+               $(APT_SAFE_TOOL) remove libpq5 libpq-dev ; \
+       fi
+       $(APT_BACKPORT_TOOL) install $(PGSQL_CLIENT_DEBS_91)
+       $(APT_TOOL) install apache2-prefork-dev
+
 install_pgsql_client_debs_91:
        $(APT_TOOL) install $(PGSQL_CLIENT_DEBS_91)
 
 install_pgsql_client_debs_91:
        $(APT_TOOL) install $(PGSQL_CLIENT_DEBS_91)