Since this script runs as root inside the Docker container, the
directory created on the previous line is normally owned by root too.
This causes trouble when the package tests run later and try to create
repository information inside the directory. See, e.g.,
<https://ci.curoverse.com/job/build-packages-sso/23/consoleFull> for a
build that failed because of this.
No issue #.
if [[ ! -d "$WORKSPACE/packages/$TARGET" ]]; then
mkdir -p $WORKSPACE/packages/$TARGET
+ chown --reference="$WORKSPACE" "$WORKSPACE/packages/$TARGET"
fi
# Perl packages