Merge pull request #6 from javacruft/prefer-snap-common

Prefer snap common
This commit is contained in:
James Page 2017-10-05 11:05:50 +01:00 committed by GitHub
commit deb0242473
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,18 @@
Description: Ensure that SNAP_COMMON is used in preference to $SNAP
Author: James Page <james.page@ubuntu.com>
Forwarded: https://review.openstack.org/509724
diff --git a/oslo_config/cfg.py b/oslo_config/cfg.py
index cbdcdfa..9365956 100644
--- a/oslo_config/cfg.py
+++ b/oslo_config/cfg.py
@@ -672,8 +672,8 @@ def _get_config_dirs(project=None):
_fixpath('~'),
os.path.join('/etc', project) if project else None,
'/etc',
- os.path.join(snap, "etc", project) if snap and project else None,
os.path.join(snap_c, "etc", project) if snap_c and project else None,
+ os.path.join(snap, "etc", project) if snap and project else None,
]
return [x for x in cfg_dirs if x]

View File

@ -47,6 +47,7 @@ parts:
python-packages:
- futurist
- keystonemiddleware
- python-memcached
- lz4
- oslo.db[mysql]
- sqlalchemy-utils
@ -64,6 +65,10 @@ parts:
- python-rados
install: |
touch $SNAPCRAFT_PART_INSTALL/lib/python2.7/site-packages/paste/__init__.py
touch $SNAPCRAFT_PART_INSTALL/lib/python2.7/site-packages/repoze/__init__.py
export SNAP_ROOT="../../../"
export SNAP_SITE_PACKAGES="$SNAPCRAFT_PART_INSTALL/lib/python2.7/site-packages"
patch -d $SNAP_SITE_PACKAGES -p1 < $SNAP_ROOT/patches/oslo-config-prefer-snap-common.patch
templates:
after: [gnocchi]
plugin: dump