Merge ~ballot/apache2-charm:lp1863860 into apache2-charm:master

Proposed by Benjamin Allot
Status: Merged
Approved by: Tom Haddon
Approved revision: a97cf6086d0298c22aa7b661cd2fbc344eef77a6
Merged at revision: e4a6d41f626a45e77bfdd8934e7de2618a802bfa
Proposed branch: ~ballot/apache2-charm:lp1863860
Merge into: apache2-charm:master
Diff against target: 28 lines (+6/-2)
2 files modified
config.yaml (+4/-1)
hooks/hooks.py (+2/-1)
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Canonical IS Reviewers Pending
Review via email: mp+379451@code.launchpad.net

Commit message

Fix extra_packages config when used with several packages

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
Tom Haddon (mthaddon) wrote :

One small change, otherwise looks good.

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

Merge proposal is approved, but source revision has changed, setting status to needs review.

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

Change successfully merged at revision e4a6d41f626a45e77bfdd8934e7de2618a802bfa

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/config.yaml b/config.yaml
2index 5147352..23c4d65 100644
3--- a/config.yaml
4+++ b/config.yaml
5@@ -195,7 +195,10 @@ options:
6 default: "On"
7 extra_packages:
8 type: string
9- description: List of extra packages to be installed (e.g. commercial GeoIP package)
10+ description: |
11+ List of extra packages to be installed (e.g. commercial GeoIP package).
12+ This can be a string of packages space or comma separated.
13+ i.e "screen cowsay" or "screen,cowsay".
14 default: ""
15 openid_provider:
16 type: string
17diff --git a/hooks/hooks.py b/hooks/hooks.py
18index b2647f7..0c652f7 100755
19--- a/hooks/hooks.py
20+++ b/hooks/hooks.py
21@@ -57,7 +57,8 @@ def apt_get_install(package=None):
22 if package is None:
23 return False
24 cmd_line = ['apt-get', '-y', 'install', '-qq']
25- cmd_line.append(package)
26+ for pkg in re.split(' |,'):
27+ cmd_line.append(pkg)
28 return subprocess.call(cmd_line)
29
30

Subscribers

People subscribed via source and target branches