Skip to content

Commit e33902c

Browse files
committed
bifrost: fix creation of python3 lib symlink
When {{ venv_path }}/lib/python3 already exist and we run the ln command, we end up with: /var/lib/kolla/venv/lib/ ├── python3 -> python3.9 ├── python3.12 │   └── site-packages └── python3.9 ├── python3.12 -> python3.12 └── site-packages Instead, it should be: /var/lib/kolla/venv/lib/ ├── python3 -> python3.12 ├── python3.12 │   └── site-packages └── python3.9 └── site-packages Remove the existing link first to ensure it is created properly. Change-Id: I42dd2490d14070074fe1fa7ae9e0a4cbf095b06f
1 parent aa44d7a commit e33902c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docker/bifrost/bifrost-base/Dockerfile.j2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ RUN mkdir -p /requirements \
4848
&& python3 -m venv --system-site-packages {{ venv_path }} \
4949
&& KOLLA_DISTRO_PYTHON_VERSION=$(/usr/bin/python3 -c "import sys; print('{}.{}'.format(sys.version_info.major, sys.version_info.minor))") \
5050
&& cd {{ venv_path }}/lib \
51-
&& ln -s python${KOLLA_DISTRO_PYTHON_VERSION} {{ venv_path }}/lib/python3
51+
&& rm -f python3 \
52+
&& ln -s python${KOLLA_DISTRO_PYTHON_VERSION} python3
5253

5354
RUN ln -s bifrost-base-source/* bifrost \
5455
&& {{ macros.install_pip(['pip', 'wheel', 'setuptools']) }} \

0 commit comments

Comments
 (0)