Asset recording for a built snap

I introduced a regression, because in some cases this will try to install packages that are not in the archive anymore:

Here is a quick fix:

However, this got us thinking and discussing a lot about build-packages, because the way we handle their state is not nice. The biggest problem is that we first install using apt-get, and later we save the packages, versions and their dependencies. It would be a lot better if we could save the packages right after they were installed. This, however, requires a bigger refactor, that I have started today.

We also agreed on a couple of simplifications:

  • We will only save the build-packages installed by snapcraft. If there is a dependency that was preinstalled in the system, it will not be saved in the state. This means that the recording will be totally accurate only in cleanbuild.
  • We will save all the build-packages before the parts are pulled. This means that build-packages are no longer saved per-part, they will all be saved as global packages. Here we are discussing the location to save those global build packages:
1 Like