Skip to content

Avoid failure on lack of test-packages/ dir

Kristian Larsson requested to merge robustify-lack-of-test-packages into master

We simply create the directory if it doesn't exist to avoid subsequent failures.

If test-packges doesn't exist, then the part where we create symlinks will fail. We try to add symlinks from /src/packages into /src/test-packages. For say package FOO in /src/packages we want to create /src/test-packages and do this by running ln -s /src/packages/FOO /src/test-packages but if /src/test-packages/ doesn't exist, this will lead us to creating it, but as a symlink. This leads to subsequent errors. It is easily avoided by creating the directory from the Dockerfile in case it doesn't exist.

It should of course exist as it should be part of the skeleton but it has been observed that users have not included the test-packages/ directory because they didn't have any test-packages/ or for some other reason. Also, we currently have a bug in which the system skeleton, which currently doesn't feature a test-packages/ directory, actually assumes one to exist in the Dockerfile. We should perhaps add one to the skeleton, or remove it completely... meanwhile, by making this more robust we avoid the immediate problem.

Merge request reports