Merge ~barryprice/apache2-charm/+git/apache2-charm:master into apache2-charm:master

Proposed by Barry Price
Status: Merged
Approved by: Haw Loeung
Approved revision: bffdf7575b45dd6f9972ec79be3a49f9d3234c0f
Merged at revision: 4165c49d2de53e93f92f765dc857e41837e1e4e1
Proposed branch: ~barryprice/apache2-charm/+git/apache2-charm:master
Merge into: apache2-charm:master
Diff against target: 43 lines (+5/-8)
2 files modified
Makefile (+2/-2)
hooks/install (+3/-6)
Reviewer Review Type Date Requested Status
Haw Loeung +1 Approve
Canonical IS Reviewers Pending
Review via email: mp+428313@code.launchpad.net

Commit message

Make all python calls explicitly python2, to avoid any ambiguity when we finally port this to python3

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Haw Loeung (hloeung) wrote :

LGTM

review: Approve (+1)
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 4165c49d2de53e93f92f765dc857e41837e1e4e1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/Makefile b/Makefile
index d4f9cb5..82a7396 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ HOOKS_DIR := $(PWD)/hooks
4TEST_PREFIX := PYTHONPATH=$(HOOKS_DIR)4TEST_PREFIX := PYTHONPATH=$(HOOKS_DIR)
5TEST_DIR := $(PWD)/hooks/tests5TEST_DIR := $(PWD)/hooks/tests
6CHARM_DIR := $(PWD)6CHARM_DIR := $(PWD)
7PYTHON := /usr/bin/env python7PYTHON2 := /usr/bin/env python2
88
99
10build: test lint proof10build: test lint proof
@@ -43,7 +43,7 @@ sourcedeps:
43 @echo Updating source dependencies...43 @echo Updating source dependencies...
44 @mkdir -p build44 @mkdir -p build
45 @git clone lp:charm-helpers build/charm-helpers45 @git clone lp:charm-helpers build/charm-helpers
46 @$(PYTHON) build/charm-helpers/tools/charm_helpers_sync/charm_helpers_sync.py \46 @$(PYTHON2) build/charm-helpers/tools/charm_helpers_sync/charm_helpers_sync.py \
47 -c charm-helpers.yaml \47 -c charm-helpers.yaml \
48 -r build/charm-helpers \48 -r build/charm-helpers \
49 -d hooks/charmhelpers49 -d hooks/charmhelpers
diff --git a/hooks/install b/hooks/install
index 5bd0001..c808b3c 100755
--- a/hooks/install
+++ b/hooks/install
@@ -12,13 +12,10 @@ DISTRIB_CODENAME=$(grep DISTRIB_CODENAME /etc/lsb-release | cut -d= -f2)
12if [ "${DISTRIB_CODENAME}" = "focal" ]; then12if [ "${DISTRIB_CODENAME}" = "focal" ]; then
13 juju-log 'Ensuring python2, python-apt and python-yaml are installed'13 juju-log 'Ensuring python2, python-apt and python-yaml are installed'
14 apt-get install -y python2 python-apt python-yaml14 apt-get install -y python2 python-apt python-yaml
15
16 juju-log 'Invoking python2-based install hook'
17 python2 hooks/hooks.py install
18else15else
19 juju-log 'Ensuring python, python-apt and python-yaml are installed'16 juju-log 'Ensuring python, python-apt and python-yaml are installed'
20 apt-get install -y python python-apt python-yaml17 apt-get install -y python python-apt python-yaml
21
22 juju-log 'Invoking python-based install hook'
23 python hooks/hooks.py install
24fi18fi
19
20juju-log 'Invoking python2-based install hook'
21python2 hooks/hooks.py install

Subscribers

People subscribed via source and target branches

to all changes: