Offline build with stage-packages


#1

Is there a way to have “stage-package” semantics in a snapcraft file,
but to skip the implicit “apt update” or whatever snapcraft does while pulling
that requires Internet connectivity?

Because I really need the ability to build snaps without internet connectivity,
and doing the “stage-package” thing manually seems time-consuming, error-prone and fragile.

Are there simple workarounds, or would I have to implement a custom plugin?
Would be grateful for any pointers into the right direction!

edit:
Found a simple solution: Putting the “stage-packages” into a separate part, and only cleaning the pull steps for the other parts instead of running a complete “snapcraft clean”.


#2

There are plans to make that an implicit behavior, we might not get there in the short term though.