FYI - aliases have now been granted
Oh, thanks. I was using them so any references to where Erlang was “installed” (prefix /usr
) would work.
This will not work the way it would with a strict/devmode snap because with classic snaps, they are run in the host mount namespace (which is shared with all other non-strict/devmode applications including debs, etc.).
Were you hoping to be able to redirect any existing instances of erlang on the system to the one in your snap? If so, that’s unnecessary and I think a bit counter-intuitive, I wouldn’t expect installing the erlang snap would change files installed by the erlang deb, I would expect either they conflict with each other, or they don’t touch each other’s files.
No.
Without those layout symlinks running erl
will fail because it is looking for erlexec
in /usr/lib/erlang/erts-10.6.1/bin/
when installed with --prefix=/usr
.
It sounds like the issue you have is one with how the snap is built, are you compiling erlang in this snap by itself or are you reusing an existing package (like a deb for example) ?
Compiling in the snap. Am I supposed to do --prefix=SOME_SNAP_DIR
for an argument to configure?
@alexmurray do individual aliases within have to be approved or should all aliases I add to the snap work?
I added an alias for each command the snap installs but when I installed the snap the only command I found that didn’t inlcude the erlang.
prefix was erlc
.
In the snapcraft.yaml I have:
apps:
erl:
command: erl
aliases: [erl]
rebar3:
command: rebar3
aliases: [rebar3]
escript:
command: escript
aliases: [escript]
dialyzer:
command: dialyzer
aliases: [dialyzer]
epmd:
command: epmd
aliases: [epmd]
erlc:
command: erlc
aliases: [erlc]
typer:
command: typer
aliases: [type]
run-erl:
command: run_erl
aliases: [run_erl]
to-erl:
command: to_erl
aliases: [to_erl]
ct-run:
command: ct_run
aliases: [ct_run]
Wait, I was wrong, they are all there.
But there is still an issue. The names are not what I put in aliases
. So ct_run
is still ct-run
, run_erl
is still run-erl
and to_erl
is still to-erl
.
Is the aliases
list I added supposed to be the name given to the alias?
If this is expected and I’m using aliases
wrong, is there a way to set the name so I can have underscores instead of dashes in the names?
Apologies - I just noticed I missed this distinction - I have updated the snap declaration now to list the aliases with the underscores - please let me know if this still is not resolved but I hope it should be correct now.
Awesome, thanks again! They look good now.
@alexmurray sorry, I spoke too soon! Just had someone else give it a try and they immediately noticed that erl
is missing an alias, it is still only erlang.erl
. Can you add that one?
Done - sorry for the mixups.
Perfect, thanks, I think it is all good now