Comment 1 for bug 1828055

Revision history for this message
Tilman Baumann (tilmanbaumann) wrote :

How about

install_method = hookenv.config()['install_method']
if not hasattr(reactive, '_snap_registered') and not install_method == 'apt':
    hookenv.atstart(hookenv.log, 'Initializing Snap Layer')
    hookenv.atstart(ensure_snapd)
    hookenv.atstart(ensure_path)
    hookenv.atstart(update_snap_proxy)
    hookenv.atstart(configure_snap_enterprise_proxy)
    hookenv.atstart(install)
    reactive._snap_registered = True

This layer is a total pain on trusty and especially in trusty containers.
What's worst about is, it fails even though it will not even be used by the charm.