From 04a24680a6d7aecbeda9520f4845f51ae0cb4271 Mon Sep 17 00:00:00 2001 From: Dave Page Date: Fri, 5 Mar 2021 09:58:30 +0000 Subject: [PATCH] Ensure that the venv activation scripts have the correct path in them on Linux. Partially fixes #6279 --- docs/en_US/release_notes_5_1.rst | 1 + pkg/linux/build-functions.sh | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docs/en_US/release_notes_5_1.rst b/docs/en_US/release_notes_5_1.rst index 6eb817f8d..8347f3065 100644 --- a/docs/en_US/release_notes_5_1.rst +++ b/docs/en_US/release_notes_5_1.rst @@ -32,5 +32,6 @@ Bug fixes | `Issue #6259 `_ - Ensure that proper error message should be shown on the properties and statistics tab in case of insufficient privileges for a subscription. | `Issue #6260 `_ - Fixed an issue where the 'Create Slot' option is disabled in case of the same IP/host provided but the port is different. | `Issue #6272 `_ - Fixed an issue where the user is not able to change the connection in Query Tool when any SQL file is opened. +| `Issue #6279 `_ - Ensure that the venv activation scripts have the correct path in them on Linux. | `Issue #6281 `_ - Fixed an issue where schema diff showing wrong SQL when comparing triggers with different when clause. | `Issue #6286 `_ - Ensure that the template database should be visible while creating the database. diff --git a/pkg/linux/build-functions.sh b/pkg/linux/build-functions.sh index ca3604c79..75b3eb84c 100644 --- a/pkg/linux/build-functions.sh +++ b/pkg/linux/build-functions.sh @@ -60,6 +60,11 @@ _create_python_virtualenv() { # Install the requirements pip3 install --no-cache-dir --no-binary psycopg2 -r ${SOURCEDIR}/requirements.txt + # Fixup the paths in the venv activation scripts + sed -i 's/VIRTUAL_ENV=.*/VIRTUAL_ENV="\/usr\/pgadmin4\/venv"/g' venv/bin/activate + sed -i 's/setenv VIRTUAL_ENV .*/setenv VIRTUAL_ENV "\/usr\/pgadmin4\/venv"/g' venv/bin/activate.csh + sed -i 's/set -gx VIRTUAL_ENV .*/set -gx VIRTUAL_ENV "\/usr\/pgadmin4\/venv"/g' venv/bin/activate.fish + # Figure out some paths for use when completing the venv # Use "python3" here as we want the venv path PYMODULES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")