Hello There,
I have been trying to understand the base snap
concepts and see if that is something we could use in one of our projects. As usual, the documentations are hard to find . All I could find are this forum topic and these demos (base-snap and base-snap-consumer).
My requirements or problem statement is as below.
- The project is a python package turned in to snap , though the actual python package is very small, the dependencies are huge and it would take a lot of time to build and resulting snap size is also huge (around 80+ MB).
- The Idea would be (if feasible) to divide the entire packages in to base snap (which installs python + other system and third party packages along with all the install dependencies of our python package) and the actual snap for our python package (There by reducing the time to build and size of the resulting snap (hopefully ??)).
So to begin with, I cloned the repo in to a new directory my-snap-base
, modified the snapcraft.yaml
and removed apps
section, addedd type: base
, renamed it to my-snap-base
and built the snap. I then, went ahead to the original snap directory my-snap
,edited the snapcraft.yaml
this time to exclude all the parts
which are now part of my-base-snap
and tried building the snap. The snap failed to build at the prime
stage while trying to create command wrappers
for the third party packages such as sqlite3
which are now part of base-snap. To overcome this error I though to moving the required app section to base-snap
itself but on going through the forum topic Base snaps with defined applications I am again confused .
What would be the best way to handle this situation ?Is there a way I can tell snapcraft
to just create the command wrappers and look for the required binaries in the base-snap upon installation/ at run time ? Or Should I just skip creating the base snap and stick to what we are having at present (one snap with everything packaged) ?