From 15efd80e012aed6c8a5699d48a749f7f1fc79825 Mon Sep 17 00:00:00 2001 From: Jeff Godin Date: Tue, 13 Sep 2011 15:40:10 -0400 Subject: [PATCH] Simplify test for libpq-dev Simplify libpq-dev test logic per dbs suggestion (single if instead of nested), also remove leftover debugging echo statement. --- Open-ILS/src/extras/Makefile.install | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/Open-ILS/src/extras/Makefile.install b/Open-ILS/src/extras/Makefile.install index 26927f9a1e..bd9ac6fb7d 100644 --- a/Open-ILS/src/extras/Makefile.install +++ b/Open-ILS/src/extras/Makefile.install @@ -388,19 +388,15 @@ install_debs: install_pgsql_client_debs_90: @LIBPQ=`$(APT_TOOL) versions libpq-dev 2>&1 | grep ^i|sed 's/^i .[ \t]*//'|cut -d. -f1` ; \ - if [ $$LIBPQ ] ; \ + if [[ -n $$LIBPQ && $$LIBPQ -eq 8 ]] ; \ then \ - echo $$LIBPQ; \ - if [ $$LIBPQ -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 \ + 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_90) $(APT_TOOL) install apache2-prefork-dev -- 2.11.0