Merge lp:~james-page/charms/trusty/glance/wily into lp:~openstack-charmers-archive/charms/trusty/glance/next

Proposed by James Page
Status: Merged
Merged at revision: 140
Proposed branch: lp:~james-page/charms/trusty/glance/wily
Merge into: lp:~openstack-charmers-archive/charms/trusty/glance/next
Diff against target: 42 lines (+21/-1)
2 files modified
hooks/glance_relations.py (+1/-1)
hooks/install (+20/-0)
To merge this branch: bzr merge lp:~james-page/charms/trusty/glance/wily
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+271980@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 #9636 glance-next for james-page mp271980
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/9636/

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

charm_lint_check #10454 glance-next for james-page mp271980
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/10454/

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

charm_amulet_test #6589 glance-next for james-page mp271980
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/6589/

Preview Diff

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

Subscribers

People subscribed via source and target branches