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
This commit is contained in:
@ -48,7 +48,8 @@ RUN mkdir -p /requirements \
|
||||
&& python3 -m venv --system-site-packages {{ venv_path }} \
|
||||
&& KOLLA_DISTRO_PYTHON_VERSION=$(/usr/bin/python3 -c "import sys; print('{}.{}'.format(sys.version_info.major, sys.version_info.minor))") \
|
||||
&& cd {{ venv_path }}/lib \
|
||||
&& ln -s python${KOLLA_DISTRO_PYTHON_VERSION} {{ venv_path }}/lib/python3
|
||||
&& rm -f python3 \
|
||||
&& ln -s python${KOLLA_DISTRO_PYTHON_VERSION} python3
|
||||
|
||||
RUN ln -s bifrost-base-source/* bifrost \
|
||||
&& {{ macros.install_pip(['pip', 'wheel', 'setuptools']) }} \
|
||||
|
Reference in New Issue
Block a user