diff --git a/postgres-appliance/Dockerfile.build b/postgres-appliance/Dockerfile.build index 80b57b8bf..74086322d 100644 --- a/postgres-appliance/Dockerfile.build +++ b/postgres-appliance/Dockerfile.build @@ -282,8 +282,9 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && if [ -d /usr/share/postgresql/9.5/contrib/postgis-$POSTGIS_VERSION ]; then \ cd /usr/share/postgresql/9.5/contrib/postgis-$POSTGIS_VERSION \ && for f in *.sql *.pl; do \ - for v in 9.4 9.6 10; do \ - if [ -f /usr/share/postgresql/$v/contrib/postgis-$POSTGIS_VERSION/$f ] \ + if [ -L $f ]; then continue; fi \ + && for v in $PGOLDVERSIONS; do \ + if [ $v != 9.5 ] && [ -f /usr/share/postgresql/$v/contrib/postgis-$POSTGIS_VERSION/$f ] \ && [ ! -L /usr/share/postgresql/$v/contrib/postgis-$POSTGIS_VERSION/$f ] \ && diff /usr/share/postgresql/$v/contrib/postgis-$POSTGIS_VERSION/$f $f > /dev/null; then \ rm /usr/share/postgresql/$v/contrib/postgis-$POSTGIS_VERSION/$f \ @@ -331,8 +332,9 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && if [ -d /usr/share/postgresql/9.5/extension ]; then \ cd /usr/share/postgresql/9.5/extension \ && for f in *.sql *.control; do \ - for v in 9.3 9.4 9.6 10; do \ - if [ -f /usr/share/postgresql/$v/extension/$f ] \ + if [ -L $f ]; then continue; fi \ + && for v in $PGOLDVERSIONS; do \ + if [ $v != 9.5 ] && [ -f /usr/share/postgresql/$v/extension/$f ] \ && [ ! -L /usr/share/postgresql/$v/extension/$f ] \ && diff /usr/share/postgresql/$v/extension/$f $f > /dev/null; then \ rm /usr/share/postgresql/$v/extension/$f \