Merge ~jjo/layer-snap:jjo-trusty-snap_nopes into ~stub/layer-snap:master

Proposed by JuanJo Ciarlante
Status: Rejected
Rejected by: JuanJo Ciarlante
Proposed branch: ~jjo/layer-snap:jjo-trusty-snap_nopes
Merge into: ~stub/layer-snap:master
Diff against target: 31 lines (+10/-5)
1 file modified
reactive/snap.py (+10/-5)
Reviewer Review Type Date Requested Status
Stuart Bishop Disapprove
Review via email: mp+319137@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Stuart Bishop (stub) wrote :

The snap layer supports trusty.

What is the problem you are trying to fix?

review: Disapprove
Revision history for this message
JuanJo Ciarlante (jjo) wrote :

Thanks for the review - seems that the unit I was installing this had
a bad sysv-rc dependency tree, voiding snapd from being installed.
Disregarding this MP.

Unmerged commits

29d94b6... by JuanJo Ciarlante

[jjo] skip snap register on trusty

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/reactive/snap.py b/reactive/snap.py
2index d357e05..db730bf 100644
3--- a/reactive/snap.py
4+++ b/reactive/snap.py
5@@ -114,6 +114,15 @@ def ensure_path():
6 os.environ['PATH'] += ':/snap/bin'
7
8
9+def snap_register():
10+ if get_series() == 'trusty':
11+ return
12+ hookenv.atstart(hookenv.log, 'Initializing Snap Layer')
13+ hookenv.atstart(ensure_snapd)
14+ hookenv.atstart(ensure_path)
15+ hookenv.atstart(update_snap_proxy)
16+ hookenv.atstart(install)
17+
18 # Per https://github.com/juju-solutions/charms.reactive/issues/33,
19 # this module may be imported multiple times so ensure the
20 # initialization hook is only registered once. I have to piggy back
21@@ -125,9 +134,5 @@ if not hasattr(reactive, '_snap_registered'):
22 # do this, then the config in the hook environment may show updates
23 # to running hooks well before the config-changed hook has been invoked
24 # and the intialization provided an opertunity to be run.
25- hookenv.atstart(hookenv.log, 'Initializing Snap Layer')
26- hookenv.atstart(ensure_snapd)
27- hookenv.atstart(ensure_path)
28- hookenv.atstart(update_snap_proxy)
29- hookenv.atstart(install)
30+ snap_register()
31 reactive._snap_registered = True

Subscribers

People subscribed via source and target branches