Perhaps this layer should do nothing at all if install_method is set to apt
Bug #1828055 reported by
Tilman Baumann
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snap Layer |
New
|
Undecided
|
Unassigned |
Bug Description
Some/A lot of charms allow selecting different install methods. Either snap or apt.
Perhaps this snap should do nothing at all when the config value `install_method` exists and is set to apt.
It seems unnecessary to install snapd at module load time if it's not going to be used.
To post a comment you must log in.
How about
install_method = hookenv. config( )['install_ method' ] atstart( hookenv. log, 'Initializing Snap Layer') atstart( ensure_ snapd) atstart( ensure_ path) atstart( update_ snap_proxy) atstart( configure_ snap_enterprise _proxy) atstart( install) _snap_registere d = True
if not hasattr(reactive, '_snap_registered') and not install_method == 'apt':
hookenv.
hookenv.
hookenv.
hookenv.
hookenv.
hookenv.
reactive.
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.