Update to install python-udev
This is required as it is not a dependency of charms.ceph Change-Id: I9dc06c0e3b5fec2c6ed87f61798ed71db03c40fe Closes-Bug: 1645481
This commit is contained in:
parent
425eec8818
commit
1f4844046e
|
@ -2,7 +2,7 @@
|
|||
# Wrapper to deal with newer Ubuntu versions that don't have py2 installed
|
||||
# by default.
|
||||
|
||||
declare -a DEPS=('apt' 'netaddr' 'netifaces' 'pip' 'yaml' 'dnspython')
|
||||
declare -a DEPS=('apt' 'netaddr' 'netifaces' 'pip' 'yaml')
|
||||
|
||||
check_and_install() {
|
||||
pkg="${1}-${2}"
|
||||
|
@ -17,4 +17,5 @@ for dep in ${DEPS[@]}; do
|
|||
check_and_install ${PYTHON} ${dep}
|
||||
done
|
||||
|
||||
./hooks/install_deps
|
||||
exec ./hooks/install.real
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
# Wrapper to ensure that python dependencies are installed before we get into
|
||||
# the python part of the hook execution
|
||||
|
||||
declare -a DEPS=('dnspython' 'pyudev')
|
||||
|
||||
check_and_install() {
|
||||
pkg="${1}-${2}"
|
||||
if ! dpkg -s ${pkg} 2>&1 > /dev/null; then
|
||||
apt-get -y install ${pkg}
|
||||
fi
|
||||
}
|
||||
|
||||
PYTHON="python"
|
||||
|
||||
for dep in ${DEPS[@]}; do
|
||||
check_and_install ${PYTHON} ${dep}
|
||||
done
|
|
@ -3,4 +3,5 @@
|
|||
# after we upgrade the charm with newer libraries
|
||||
rm -rf **/*.pyc
|
||||
|
||||
./hooks/install_deps
|
||||
exec ./hooks/upgrade-charm.real
|
||||
|
|
Loading…
Reference in New Issue