Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
snap: add a way to add common slots to the OS snap #803
Conversation
jdstrand
reviewed
Apr 6, 2016
| + "timeserver-control", | ||
| + "timezone-control", | ||
| + // XXX: those two should perhaps not be added by default | ||
| + "unit7", |
jdstrand
reviewed
Apr 6, 2016
| + | ||
| +// AddCommonSlotsToOSSnap adds slots of well-known interfaces to the OS snap. | ||
| +// | ||
| +// This function is indented to be used temporarily, before the OS snap is |
zyga
added some commits
Apr 6, 2016
jdstrand
reviewed
Apr 6, 2016
| + "system-observe", | ||
| + "timeserver-control", | ||
| + "timezone-control", | ||
| + // XXX: those two should perhaps not be added by default |
jdstrand
Apr 6, 2016
Contributor
They should not be added on an IoT device but should for snappy dimension on classic. I'm not sure of the timing of things, but snappy on classic will continue to be blocked unless these are added in some way (doesn't have to be here, but if not here, via some other declaration). One way to do this is a cheap check like the launcher does and see if /var/lib/dpkg/status exists. Since this is only a temporary check, perhaps a cheap check like this is ok.
zyga
Apr 7, 2016
Contributor
I'll add a card for that and do that after 16.04, for now this just gets us going and if we release the os snap again with properly defined slots we can drop this feature altogether.
niemeyer
reviewed
Apr 7, 2016
| +// | ||
| +// It is assumed that slots have names matching the interface name. Existing | ||
| +// slots are not changed, only missing slots are added. | ||
| +func AddCommonSlotsToOSSnap(snapInfo *Info) error { |
niemeyer
Apr 7, 2016
Contributor
Let's please name this AddImplicitSlots, and below handle only if Type == TypeOS, ignoring otherwise rather than erroring. It's okay that we don't have something for the other types right now.
That also means we can drop the error result.
|
One comment and LGTM |
zyga commentedApr 6, 2016
Signed-off-by: Zygmunt Krynicki zygmunt.krynicki@canonical.com