Problems with PREFIX when building a snap

James Jesudason james.jesudason at canonical.com
Fri Jul 29 08:26:45 UTC 2016


On 28 July 2016 at 18:36, Dietmar Winkler <dietmar.winkler at dwe.no> wrote:

> Thanks James,
>
> you are right the build works now. But I hope you don't mind me asking
> (since I really want to understand it) how you ended up at that
> IPEPREFIX path.
>
> The source is in:
>
> ~/tmp/snap/ipe/parts/ipe/src
>
> For the build that gets copied over to
>
> ~/tmp/snap/ipe/parts/ipe/build
>
> make gets executed in the subdir "src", which means now we are in
>
> ~/tmp/snap/ipe/parts/ipe/build/src
>
> Now I try to travers 3 levels up as defined by
>
> - IPEPREFIX=../../../install
>
> and I end up in
>
> ~/tmp/snap/ipe/parts/
>
> but here is only the "ipe" dir the install is one level below:
>
> ~/tmp/snap/ipe/parts[master]$ tree -L 2
> .
> └── ipe
>     ├── build
>     ├── install
>     ├── src
>     ├── state
>     └── ubuntu
>
> So how come
>
> - IPEPREFIX=../../../install
>
> works but
>
> - IPEPREFIX=../../install
>
> would not (which I would find logical)?
>
> ​It's more to do with the build script than with snapcraft. Since there
are multiple directories called "install" it's hard to see what's
happening. If you try something like "../xxxx" instead, then it's easier to
spot what the script is doing. ​

​When the script was running, I spotted th​at it said:

make[2]: Entering directory '<snip>/parts/ipe/build/src/ipe'

​So, that's where the extra level comes from.​



>
> One other question, is there somewhere a list of available "plugs". I
> guessed I would need "x11" but only found this reference in some
> examples. I did not manage to find any specific documentation on this.
>
>
​The plugs are documented with snapd rather than snapcraft. There's a list
here:
https://developer.ubuntu.com/en/snappy/guides/interfaces/

But the definitive list is the source code (sometimes the tests there can
be helpful):
https://github.com/snapcore/snapd/tree/master/interfaces/builtin​

​The "playpen" examples can be helpful as well:
https://github.com/ubuntu/snappy-playpen
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20160729/7ab4aa4e/attachment.html>


More information about the Snapcraft mailing list