dockerTools: replace --no-clobber with --update=none

Since coreutils v9.2 the `--no-clobber` flag results in a non-zero exit
code when the destination files exist. Using `--update=none` will now
reproduce the old behavior of `--no-clobber`.

However, the `--update=none` flag was introduced in coreutils v9.3 and
thus `mergeImages` will fail if you have an older version than v9.3 in
stdenv after applying this commit.

[coreutils v9.3 changelog](f386722dc0/NEWS (L48))
This commit is contained in:
Viktor Kronvall 2023-08-13 00:25:29 +09:00
parent b354b3cd3a
commit b35440bfcf

View file

@ -777,7 +777,7 @@ rec {
fi
done
# Copy all layers from input images to output image directory
cp -R --no-clobber inputs/*/* image/
cp -R --update=none inputs/*/* image/
# Merge repositories objects and manifests
jq -s add "''${repos[@]}" > repositories
jq -s add "''${manifests[@]}" > manifest.json