Adjust pgtap install steps to correctly grab versoin
authorJason Boyer <jboyer@equinoxOLI.org>
Mon, 28 Mar 2022 11:06:39 +0000 (07:06 -0400)
committerJason Boyer <jboyer@equinoxOLI.org>
Mon, 28 Mar 2022 11:06:39 +0000 (07:06 -0400)
postgresql-server-dev-all is rather unhelpful when trying to determine the pg version....

Signed-off-by: Jason Boyer <jboyer@equinoxOLI.org>
installer/stretch/eg_stretch_installer.sh

index 3f45c02..5715ecc 100755 (executable)
@@ -911,7 +911,7 @@ function evergreen_db_create {
 
     # output the name of the currently installed pg server dev package, then
     # throw away everything up to and including the last '-' to get the correct pg version
-    PGVERS=`dpkg-query --showformat="\\${binary:Package}" --show 'postgresql-server-dev-*'`
+    PGVERS=`dpkg-query --showformat="\\${binary:Package}\\n" --show 'postgresql-server-dev-*' | grep -v postgresql-server-dev-all`
     apt-get install postgresql-${PGVERS##*-}-pgtap
 
     echo 'CREATE EXTENSION pgtap;' | su - postgres -c "psql evergreen"