If you attempt to install the resultant snap three times, executing the `layout-fail` command between each, the third attempt will fail with:
```
- Setup snap "layout-fail" (unset) security profiles (cannot setup mount for snap "layout-fail": cannot update mount namespace of snap "layout-fail": cannot update preserved namespace of snap "layout-fail": cannot update snap namespace: cannot write to "/usr/share/alsa/alsa.conf" because it would affect the host in "/usr/share/alsa")
- Setup snap "layout-fail" (unset) security profiles (cannot update mount namespace of snap "layout-fail": cannot update preserved namespace of snap "layout-fail": cannot update snap namespace: cannot write to "/usr/share/alsa/alsa.conf" because it would affect the host in "/usr/share/alsa")
```
A subsequent attempt to install without discarding the namespace fails differently with:
```
error: cannot perform the following tasks:
- Setup snap "layout-fail" (unset) security profiles (cannot setup mount for snap "layout-fail": cannot update mount namespace of snap "layout-fail": cannot update preserved namespace of snap "layout-fail": cannot update snap namespace: no such file or directory)
- Setup snap "layout-fail" (unset) security profiles (cannot update mount namespace of snap "layout-fail": cannot update preserved namespace of snap "layout-fail": cannot update snap namespace: no such file or directory)
```
If you discard the namespace then two more installations, separated by running the `layout-fail` command, will be accepted by snapd. If you do not run the `layout-fail` command between each installation you may install as many times as you like without failure.
This isn't specific to the arch triplet as I surmised in my original post. I've reproduced it with a layout of:
``` share/alsa/ alsa.conf: share/alsa/ alsa.conf
layout:
/usr/
bind-file: $SNAP/usr/
```
My reproduction repoistory is at https:/ /github. com/diddlesnaps /layout- fail
If you attempt to install the resultant snap three times, executing the `layout-fail` command between each, the third attempt will fail with:
``` alsa/alsa. conf" because it would affect the host in "/usr/share/alsa") alsa/alsa. conf" because it would affect the host in "/usr/share/alsa")
- Setup snap "layout-fail" (unset) security profiles (cannot setup mount for snap "layout-fail": cannot update mount namespace of snap "layout-fail": cannot update preserved namespace of snap "layout-fail": cannot update snap namespace: cannot write to "/usr/share/
- Setup snap "layout-fail" (unset) security profiles (cannot update mount namespace of snap "layout-fail": cannot update preserved namespace of snap "layout-fail": cannot update snap namespace: cannot write to "/usr/share/
```
A subsequent attempt to install without discarding the namespace fails differently with:
```
error: cannot perform the following tasks:
- Setup snap "layout-fail" (unset) security profiles (cannot setup mount for snap "layout-fail": cannot update mount namespace of snap "layout-fail": cannot update preserved namespace of snap "layout-fail": cannot update snap namespace: no such file or directory)
- Setup snap "layout-fail" (unset) security profiles (cannot update mount namespace of snap "layout-fail": cannot update preserved namespace of snap "layout-fail": cannot update snap namespace: no such file or directory)
```
If you discard the namespace then two more installations, separated by running the `layout-fail` command, will be accepted by snapd. If you do not run the `layout-fail` command between each installation you may install as many times as you like without failure.