From b35440bfcf536d1043dc04356c9f021bddc68256 Mon Sep 17 00:00:00 2001 From: Viktor Kronvall Date: Sun, 13 Aug 2023 00:25:29 +0900 Subject: [PATCH] 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](https://github.com/coreutils/coreutils/blob/f386722dc0d996d5379f12b4a8d4dd15ca7df4b5/NEWS#L48) --- pkgs/build-support/docker/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix index b74d7885d54a..f6416c81cc0a 100644 --- a/pkgs/build-support/docker/default.nix +++ b/pkgs/build-support/docker/default.nix @@ -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