Skip to content

Commit 08e95e5

Browse files
jpicyoctozepto
authored andcommitted
Fix _get_images_dir when pip-installed with --user
There are two cases where pip installs kolla share into ~/.local/share/kolla: - with `pip install --user kolla` - with `pip install kolla` as non-root This patch helps kolla find the share dir in these cases. Closes-Bug: #1930544 Change-Id: I0b3eb6744a34a601266179fb358510a5c500e6ba (cherry picked from commit db78657)
1 parent d52bb8e commit 08e95e5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

kolla/image/build.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,7 @@ def _get_images_dir(self):
790790
PROJECT_ROOT,
791791
os.path.join(sys.prefix, 'share/kolla'),
792792
os.path.join(sys.prefix, 'local/share/kolla'),
793+
os.path.join(os.getenv('HOME', ''), '.local/share/kolla'),
793794
# NOTE(zioproto): When Kolla is used within a snap, the env var
794795
# $SNAP is the directory where the snap is mounted.
795796
# https://github.com/zioproto/snap-kolla
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
fixes:
3+
- |
4+
Fix support for kolla install in ``~/.local``. `LP#1930544
5+
<https://launchpad.net/bugs/1930544>`__

0 commit comments

Comments
 (0)