Handling update-alternatives

Didier Roche didrocks at ubuntu.com
Fri Aug 5 11:54:33 UTC 2016


Le 05/08/2016 à 12:25, Dan Watkins a écrit :
> On 05/08/16 11:00, John Lenton wrote:
>> On 5 August 2016 at 10:20, Dan Watkins <daniel.watkins at canonical.com> wrote:
>>> Something I'm snapping tries to run `awk`, which isn't included in the
>>> ubuntu-core snap
>> awk *is* in the ubuntu-core snap. What's happening is bug #1580018:
>> you've used update-alternatives on the host to switch to an awk that
>> is different to the one in core. If you can live with mawk instead of
>> gawk on the host (at least during the build) things will work.
> The snapped program calls /usr/bin/awk at runtime, so I'd presumably
> need mawk to be installed in the host at runtime as well?
>
> (AIUI, /usr/bin/awk is a symlink to /etc/alternatives/awk which gets
> resolved against the host's /etc.  The host's /etc/alternatives/awk
> points at /usr/bin/[gm]awk which is then resolved against the snap's
> view of the world.)

I think that's something which could be fixed again by the request in
https://bugs.launchpad.net/ubuntu/+source/snapcraft/+bug/1583250/ as the
path is hardcoded in your program to redirect to the actual binary in $SNAP.
It seems that Gustavo missed my last ping on "Trying to package angband
as snap" topic (same ML) where this is referenced as well. Maybe I'll be
luckier this time :)

Cheers,
Didier




More information about the Snapcraft mailing list