Merge lp:~james-page/charms/trusty/mongodb/forward-compat-xenial into lp:charms/trusty/mongodb

Proposed by James Page
Status: Merged
Merged at revision: 84
Proposed branch: lp:~james-page/charms/trusty/mongodb/forward-compat-xenial
Merge into: lp:charms/trusty/mongodb
Diff against target: 39 lines (+21/-1)
2 files modified
hooks/hooks.py (+1/-1)
hooks/install (+20/-0)
To merge this branch: bzr merge lp:~james-page/charms/trusty/mongodb/forward-compat-xenial
Reviewer Review Type Date Requested Status
Charles Butler (community) Approve
Review via email: mp+287312@code.launchpad.net
To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #1294 mongodb for james-page mp287312
    UNIT OK: passed

Build: http://10.245.162.36:8080/job/charm_unit_test/1294/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #1546 mongodb for james-page mp287312
    LINT OK: passed

Build: http://10.245.162.36:8080/job/charm_lint_check/1546/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #542 mongodb for james-page mp287312
    AMULET OK: passed

Build: http://10.245.162.36:8080/job/charm_amulet_test/542/

Revision history for this message
Charles Butler (lazypower) wrote :

+1 LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/hooks.py'
2--- hooks/hooks.py 2015-12-17 02:22:42 +0000
3+++ hooks/hooks.py 2016-02-26 14:02:09 +0000
4@@ -926,7 +926,7 @@
5 ###############################################################################
6 # Hook functions
7 ###############################################################################
8-@hooks.hook('install')
9+@hooks.hook('install.real')
10 def install_hook():
11 juju_log('Begin install hook.')
12 execd_preinstall()
13
14=== added file 'hooks/install'
15--- hooks/install 1970-01-01 00:00:00 +0000
16+++ hooks/install 2016-02-26 14:02:09 +0000
17@@ -0,0 +1,20 @@
18+#!/bin/bash
19+# Wrapper to deal with newer Ubuntu versions that don't have py2 installed
20+# by default.
21+
22+declare -a DEPS=('apt' 'netaddr' 'netifaces' 'pip' 'yaml')
23+
24+check_and_install() {
25+ pkg="${1}-${2}"
26+ if ! dpkg -s ${pkg} 2>&1 > /dev/null; then
27+ apt-get -y install ${pkg}
28+ fi
29+}
30+
31+PYTHON="python"
32+
33+for dep in ${DEPS[@]}; do
34+ check_and_install ${PYTHON} ${dep}
35+done
36+
37+exec ./hooks/install.real
38
39=== renamed symlink 'hooks/install' => 'hooks/install.real'

Subscribers

People subscribed via source and target branches

to all changes: