Snapcraft reports an error if the executable for a command is provided by a content interface
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Expired
|
Undecided
|
Unassigned |
Bug Description
I tried to create a snap with the following definitions in my snapcraft.yaml
plugs:
python3:
interface: content
content: python3
target: python
apps:
hello:
command: python/bin/python3 $SNAP/hello.py
plugs:
- python3
The idea being that the executable for the command would be provided by another snap via the content interface. Unfortunately, Snapcraft refuses to build my snap because the executable doesn't exist in the snap.
I can work around this by creating a shell script that exec's the program shared via the interface, but it would be nice if I didn't have to work around this check.
Perhaps it would make sense to suppress the error if the executable's path is below a directory that will act as a mount point for the content interface?
Can this be solved by doing
`command: /usr/bin/env $SNAP/python/ bin/python3 $SNAP/hello.py`