
Previously this charm had relied on python-apt being installed by the principle. As charms migrate to py3 this is no longer a safe assumption and actually never was. This change ensures that python-apt is installed before immediatly. This follows the same pattern as other charms by adding an install and install.real files. Change-Id: I9fe2a031df736b867d4f277448a4d8649fa8de64
19 lines
285 B
Bash
Executable File
19 lines
285 B
Bash
Executable File
#!/bin/bash
|
|
|
|
declare -a DEPS=('apt')
|
|
|
|
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
|
|
|
|
exec ./hooks/install.real
|