Skip to content

Fix testenv-clean-build by copying in includes

Kristian Larsson requested to merge 174-fix-testenv-clean-build into master

The testenv-clean-build target was a little too zealous in its cleaning as it not only cleaned out the packages defined in the source repository but also all the included packages. Removing includes naturally leads to subsequent package load failures.

This is now fixed by copying in the included packages again. We accomplish this by tagging the build image with the tag 'build' so we can later reference it. In the build image we have all the includes in the /includes directory, from which we can easily copy them over into /var/opt/ncs/packages/.

An alternative would be to not clean away the included packages, but that would also make the clean-build target not work for removing a package. Plus, if someone actually modifies an included package somehow, I imagine it would be useful to have testenv-clean-build actually restore those packages. The downside to our approach is that it takes a little longer to run, but as this shouldn't be an often used target, that should be mostly non-consequential.

Closes #174 (closed)

Merge request reports