No warnings of what's unclean paths leads to terrible UX
Bug #1635170 reported by
Timo Jyrinki
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Triaged
|
High
|
Unassigned |
Bug Description
1. Have for example read: /usr/lib/ in your content interface slot.
2. Snap the snap.
3. Install the snap.
Expected behavior:
- You have your slot, or you get an early error/warning.
Observed behavior:
- No slot to be seen, no warnings at any point of the process.
- Only with journalctl one can see (after going through the snapping and installing process) that "snap ... has bad plugs or slots: ... (content interface path is not clean: "/usr/lib/").
- "Not clean" is vague, I found from the snapd code that "clean" would be something that stays unchanged after Go's filepath.clean. Only at this point I was able to figure out that I have extra "/" in my snapcraft.yaml.
I feel part of the problem is that snapd generally doesn't mind installing snaps with erroneous or even non-existing interfaces - it's potentially useful to allow that, but by default installing should probably fail, require an argument or ask interactively before proceeding. Like 'snap install --force-interfaces' (analogous to --dangerous).