diff --git a/pkg/debian/build.sh b/pkg/debian/build.sh index ae70776ef..3657833cf 100755 --- a/pkg/debian/build.sh +++ b/pkg/debian/build.sh @@ -31,6 +31,14 @@ _copy_code echo "Creating the server package..." mkdir "${SERVERROOT}/DEBIAN" +echo "Creating preinst script..." +cat << EOF > "${SERVERROOT}/DEBIAN/preinst" +#!/bin/sh + +rm -rf /usr/pgadmin4/venv +rm -rf /usr/pgadmin4/web +EOF + cat << EOF > "${SERVERROOT}/DEBIAN/control" Package: ${APP_NAME}-server Version: ${APP_LONG_VERSION} diff --git a/pkg/redhat/build.sh b/pkg/redhat/build.sh index 8d6f2a24f..b1547b540 100755 --- a/pkg/redhat/build.sh +++ b/pkg/redhat/build.sh @@ -67,6 +67,10 @@ Requires: ${PYTHON_BINARY}, libpq5, krb5-libs %description The core server package for pgAdmin. pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world. +%pre +rm -rf /usr/pgadmin4/venv +rm -rf /usr/pgadmin4/web + %build %install