Desktop extension symlinks aren't updated on snap revert
Bug #2009970 reported by
Joseph Brock
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
New
|
Undecided
|
Unassigned |
Bug Description
The desktop extensions check whether or not to symlink libraries based on the contents of $SNAP_USER_
This issue also affects the ubuntu/
I'm pretty certain that this is an issue that affects Snapcraft, rather than Snapd. The issue is the with the `desktop-launch` script that's generated from `extensions/ desktop` in the Snapcraft repository. My naive solution with customers has been to replace `$SNAP_ USER_DATA/ .last_revision` with `$SNAP_ USER_COMMON/ .last_revision` , in `init` and `mark-and-exec`:
https:/ /github. com/snapcore/ snapcraft/ blob/main/ extensions/ desktop/ common/ init#L31
https:/ /github. com/snapcore/ snapcraft/ blob/main/ extensions/ desktop/ common/ mark-and- exec#L7
It's the `desktop-launch` script that's managing the symlinks that I'm talking about, and upon reverting a snap that uses `desktop-launch` in its command-chain (that also depends on one of the libraries that the script symlinks), the snap will fail to launch because those symlinks haven't been updated, since the $SNAP_DESKTOP_ LAST_REVISION variable is set incorrectly.
Though my solution works, I don't want to prescribe a specific solution, since there may well be a better solution.