snapd should configure /snap/$pkg/current on run instead of install

Bug #2003118 reported by Ted Gould
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
New
Undecided
Unassigned

Bug Description

Currently when snapd installs a package it creates a mount point to the snap on `/snap/$pkg/$rev` and then it creates a symbolic link to the latest version of that package at `/snap/$pkg/current`. This is useful when looking at the filesystem to know the revision of the snap that is currently being used, is popular with application developers, but also causes several problems.

Probably the most pressing of those problems is that application authors use that as a crutch, and evaluate it while the program is running. Which means that an application that is upgraded while it is running could end up using files from a different version of the files than when it is started. This causes many applications to crash in weird ways.

There are better ways to implement this with upgrade hooks and other things, but generally they haven't been popular with application developers and there are more drastic work arounds (disabling updates) that are encouraged in forums.

My suggestion for solving this is that `/snap/$pkg/current` should *not* be set on install time, but instead setup at runtime through a filesystem mapping. This way application developers would be able to still use their crutch, but it would exist for each running application's namespace. An upgrade then wouldn't map into the running application and cause instability. Effectively the user would experience the updated snap the next time they run the application.

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.