Skip to content

gitlab: Fix cannot overwrite directory error when symlinking in 1.16

Nirbheek Chauhan requested to merge nirbheek/gst-ci:fix-symlinking into 1.16

GitLab doesn't wipe images entirely before reusing them across jobs. It relies on the build scripts to not write outside the workdir. However, we create symlinks outside of the workdir, which breaks in weird ways.

Specifically, when ../../gstreamer/cerbero exists, ln -sf creates ../../gstreamer/cerbero/cerbero, which is wrong, but doesn't cause an error. However, when the image is reused again after this, ../../gstreamer/cerbero/cerbero already exists, so ln -sf yields:

ln: ../../gstreamer/cerbero/cerbero: cannot overwrite directory

This is fixed in master after overhauling the scripts to never write outside of workdir, but for 1.16 we need to hack it by not symlinking if the target dir already exists.

Edited by Nirbheek Chauhan

Merge request reports

Loading