From: Jason Stephenson Date: Wed, 1 Mar 2017 19:43:02 +0000 (-0500) Subject: Make debian_postgresql_repo prereq target a bit smarter. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3e5b5c33e9f8cca06778451e76249179fe17591f;p=working%2FEvergreen.git Make debian_postgresql_repo prereq target a bit smarter. We check if the apt.postgresql.org repo is not present in any files in /etc/apt/ before adding it and the key in Makefile.debian. Signed-off-by: Jason Stephenson --- diff --git a/Open-ILS/src/extras/install/Makefile.debian b/Open-ILS/src/extras/install/Makefile.debian index 1535f61239..6edb42b82a 100644 --- a/Open-ILS/src/extras/install/Makefile.debian +++ b/Open-ILS/src/extras/install/Makefile.debian @@ -33,9 +33,12 @@ debian_sys_config: # Adding this for installing versions from PostgreSQL community apt source debian_postgresql_repo: - echo "deb http://apt.postgresql.org/pub/repos/apt/ $(RELEASE_CODENAME)-pgdg main" > /etc/apt/sources.list.d/pgdg.list - wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - - $(APT_TOOL) update + if test -z "$$(grep -R apt.postgresql.org /etc/apt/)" ; then \ + echo "deb http://apt.postgresql.org/pub/repos/apt/ $(RELEASE_CODENAME)-pgdg main" \ + > /etc/apt/sources.list.d/pgdg.list; \ + wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - ; \ + $(APT_TOOL) update ; \ + fi clean: echo "cleaning"