Comment 2 for bug 1780834

Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

@stub, after further testing, setting 'snap.installed.core' won't help the set_refresh_timer() method. It looks like config-changed can happen early, so the core flag won't be set, and we'll wind up with the same warning from the description:

> Cannot set core snap config because it is not installed

So, I think there are a couple other options. If you think there's value in 'snap.installed.core', we could gate 'config.changed' handlers in layer-snap like this:

@when('snap.installed.core')
@when('config.changed.snapd_refresh')
def change_snapd_refresh():

Or we could set 'snap.installed.core' super early. Or if 'snap.installed.core' is more trouble than it's worth, we could just do the MP that's specific to set_refresh_timer():

https://code.launchpad.net/~kwmonroe/layer-snap/+git/layer-snap/+merge/349203