I am trying to make my snap slimmer by not including some libraries. My Question is: How exactly does snapcraft decide which libs to pack into the snap?
If I remove too much, I get warnings. But I can remove some things without warning. And, and this puzzles me: Some things (for example gconv) I cannot get rid of.
What is the logic here?
Does it start by copying everything from the base snap…?
well, not sure what you are using these plugs for given you do not have any apps: defined at all … usually you would have an apps: section and in there use one of the desktop extensions (which automatically adds these plugs, so you do not need to add them explicitly)
the script does check for libs existing in any of the defined extensions as well as in your defined base snap and then removes all duplicated files your snap might ship …
well, if it is the snapcraft.yaml you linked in the original post there are no apps defined, all i see is a part that is called “app:” … but it does not have a toplevel apps: entry …
Ah now I understand. I just linked to this file in electron-builder to show how I exclude files. (the line should be marked when the link is clicked.) However you are right, this is not a complete file. They are using it to create the final snapcraft.yaml before creating the snap.