From 023b086b0df9752e42ca311a32148b83515e5bd7 Mon Sep 17 00:00:00 2001 From: James Page Date: Wed, 20 Dec 2017 12:01:24 +0000 Subject: [PATCH] Fix upgrades from older charm versions Ensure that netaddr and netifaces are installed on upgrade from older py2 based charms to the newer py3 based execution. Change-Id: I1c7b2eb545e5ef5b40ab2db5a1a968ceb7d916e1 Closes-Bug: 1738979 --- hooks/install | 2 +- hooks/install_deps | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hooks/install b/hooks/install index eb5eee3b..96836422 100755 --- a/hooks/install +++ b/hooks/install @@ -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') +declare -a DEPS=('apt' 'pip' 'yaml') check_and_install() { pkg="${1}-${2}" diff --git a/hooks/install_deps b/hooks/install_deps index bb600820..3375e7a0 100755 --- a/hooks/install_deps +++ b/hooks/install_deps @@ -2,7 +2,7 @@ # Wrapper to ensure that python dependencies are installed before we get into # the python part of the hook execution -declare -a DEPS=('dnspython' 'pyudev') +declare -a DEPS=('dnspython' 'pyudev' 'netaddr' 'netifaces') check_and_install() { pkg="${1}-${2}"