Snapcraft reports an error if the executable for a command is provided by a content interface

Bug #1666013 reported by James Henstridge
14
This bug affects 2 people
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
        default-provider: python36-jamesh

    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?

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Can this be solved by doing

`command: /usr/bin/env $SNAP/python/bin/python3 $SNAP/hello.py`

Changed in snapcraft:
status: New → Incomplete
Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Even if that works, it only solves this issue for python commands.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Snapcraft because there has been no activity for 60 days.]

Changed in snapcraft:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.