Handling update-alternatives
Dan Watkins
daniel.watkins at canonical.com
Fri Aug 5 09:20:15 UTC 2016
Hello all,
Something I'm snapping tries to run `awk`, which isn't included in the
ubuntu-core snap. As such, I added gawk to stage-packages for my part:
parts:
thing:
...
stage-packages:
- gawk
Unfortunately, it didn't occur to me that awk is actually provided by
update-alternatives, so just staging the package didn't provide me with
`awk` on the PATH. It took me a few confusing build/examine iteration
to realise what was going on, which lead to me adding:
parts:
thing:
...
stage-packages:
- gawk
organize:
usr/bin/gawk: usr/bin/awk
This seems like a real wrinkle in the snapping experience; I both had to
work out what the problem was, and then hack around it in a slightly
uncomfortable way. What can we do to iron this out?
My first thought was to add an `awk` part, which would allow you to
specify the way in which you wanted awk to be provided (i.e. "this
Ubuntu package", "build from this source") and ensure that awk would end
up in the PATH of other things in the snap.
My second thought was that creating a custom part for every Ubuntu
package that uses update-alternatives is quite a lot of overhead. It's
probably impractical, but parsing packages as they are staged to do just
the `update-alternatives` step would be pretty cool.
What do people think?
Cheers,
Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20160805/a9960659/attachment.sig>
More information about the Snapcraft
mailing list