Skip to content

Commit

Permalink
Failure to remove legacy poetry version in 5.0.6-0 rpm - continued4 r…
Browse files Browse the repository at this point in the history
…ockstor#2782

- remove deleted-in-%post RPM scriptlet .venv related path.
  • Loading branch information
phillxnet committed Jan 23, 2024
1 parent 3f107a5 commit dd809da
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ if which poetry && poetry --version | grep -q "1.1.15"; then
curl -sSL https://install.python-poetry.org | python3 - --uninstall
rm --force /root/.local/bin/poetry # remove dangling dead link.
fi
# bash substring replace: null all legacy poetry paths - mid-instance
PATH="${PATH//':/root/.local/bin'/''}"
# bash substring remove (front): our above added temp legacy poetry path.
PATH="${PATH#'/root/.local/bin:'}"
PATH="${PATH//'/root/.local/bin:'/''}" # null all legacy poetry paths
# We are run, outside of development, only by RPM's %posttrans.
# As such our .venv dir has already been removed in %post (update mode).
PATH="${PATH//'/opt/rockstor/.venv/bin:'/''}" # null now removed .venv from path.
echo "build.sh has PATH=$PATH"
# Install Poetry via PIPX as a global app
# https://peps.python.org/pep-0668/#guide-users-towards-virtual-environments
Expand All @@ -31,6 +31,7 @@ python3.11 -m pipx install poetry==1.7.1
# https://github.com/python-poetry/poetry/issues/3078
export LANG=C.UTF-8
export PYTHONIOENCODING=utf8
# /usr/local/bin/poetry -> /opt/pipx/venvs/poetry
/usr/local/bin/poetry install --no-interaction --no-ansi > poetry-install.txt 2>&1
echo

Expand Down

0 comments on commit dd809da

Please sign in to comment.