Merge lp:~thedac/charms/precise/daisy-retracer/ensure-package into lp:~daisy-pluckers/charms/precise/daisy-retracer/trunk

Proposed by David Ames
Status: Merged
Merged at revision: 78
Proposed branch: lp:~thedac/charms/precise/daisy-retracer/ensure-package
Merge into: lp:~daisy-pluckers/charms/precise/daisy-retracer/trunk
Diff against target: 32 lines (+9/-2)
2 files modified
hooks/common (+6/-1)
hooks/config-changed (+3/-1)
To merge this branch: bzr merge lp:~thedac/charms/precise/daisy-retracer/ensure-package
Reviewer Review Type Date Requested Status
Brian Murray Approve
Review via email: mp+244807@code.launchpad.net

Description of the change

Found out the charm would fail if service-affecting-packages was not set.

This MP fixes this.

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/common'
2--- hooks/common 2014-12-15 19:16:43 +0000
3+++ hooks/common 2014-12-16 00:18:41 +0000
4@@ -139,8 +139,13 @@
5
6 ensure_package_status()
7 {
8+
9 status="$1" ; shift
10- packages="$@" ; shift
11+ packages="$@"
12+ if [ -z "$packages" ]; then
13+ echo "No service affecting packages defined. Ignoring"
14+ return
15+ fi
16
17 case $status in
18 install|hold)
19
20=== modified file 'hooks/config-changed'
21--- hooks/config-changed 2014-12-12 23:25:57 +0000
22+++ hooks/config-changed 2014-12-16 00:18:41 +0000
23@@ -101,7 +101,9 @@
24 fi
25
26 # Ensure package status
27-ensure_package_status $PACKAGE_STATUS $SERVICE_AFFECTING_PACKAGES
28+if [ -n "$SERVICE_AFFECTING_PACKAGES" ]; then
29+ ensure_package_status $PACKAGE_STATUS $SERVICE_AFFECTING_PACKAGES
30+fi
31
32 retracer_restart
33

Subscribers

People subscribed via source and target branches

to all changes: