Installing a snap without any apps or hooks should not install a base snap

Bug #1802541 reported by Zygmunt Krynicki
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Confirmed
Low
Unassigned

Bug Description

Content snaps may have no apps or hooks so nothing to execute. I think we should not pull in the base snap that they declare (implicitly). For example installing "gtk-common-themes" or one of the other GTK/GNOME snaps pulls in the core snap, on a system otherwise using core18 exclusively.

John Lenton (chipaca)
summary: - Installing a snap without any apps or hooks should depend on the base
+ Installing a snap without any apps or hooks should not install a base
snap
Zygmunt Krynicki (zyga)
Changed in snapd:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Samuele Pedroni (pedronis) wrote :

ATM we don't really know at the point where we decide to pull in the base whether the snap has hooks, they could be not listed in the snap.yaml. So this would need store support or changes around snapcraft output but then we could have issues with preexisting snaps if we are not careful.

A different approach is to devise a way for a snap to declare it doesn't need a base.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I agree, while we could teach the store about it I think it is much easier to just have a special case value, like "base: none" that we can handle early on explicitly.

The problem with this approach is that it feels less transparent. Something may start as a pure content snap and then grow apps and the developer will be forced to understand bases, forced to pick a base (or use core implicitly) and then write the apps they need. It feels like something the compute ought to be able to figure out.

We might also change how "snap install" works. Instead of coming up with a list of tasks that is static, we could just download the snap, inspect it, download prerequisites that we found by analysing the snap and only then activate it. This would be somewhat more complex on the logic of task conflicts.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.