summary refs log tree commit diff
path: root/pkgs/build-support/docker/default.nix
diff options
context:
space:
mode:
authorViktor Kronvall <viktor.kronvall@gmail.com>2023-08-13 00:25:29 +0900
committerViktor Kronvall <viktor.kronvall@gmail.com>2023-08-17 01:37:07 +0900
commitb35440bfcf536d1043dc04356c9f021bddc68256 (patch)
tree93d1c012845cce198b4a999e325e70ee3179a54d /pkgs/build-support/docker/default.nix
parentb354b3cd3a677c4e7462577e73b6b94a156b3e03 (diff)
downloadnixpkgs-b35440bfcf536d1043dc04356c9f021bddc68256.tar
nixpkgs-b35440bfcf536d1043dc04356c9f021bddc68256.tar.gz
nixpkgs-b35440bfcf536d1043dc04356c9f021bddc68256.tar.bz2
nixpkgs-b35440bfcf536d1043dc04356c9f021bddc68256.tar.lz
nixpkgs-b35440bfcf536d1043dc04356c9f021bddc68256.tar.xz
nixpkgs-b35440bfcf536d1043dc04356c9f021bddc68256.tar.zst
nixpkgs-b35440bfcf536d1043dc04356c9f021bddc68256.zip
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)
Diffstat (limited to 'pkgs/build-support/docker/default.nix')
-rw-r--r--pkgs/build-support/docker/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix
index b74d7885d54..f6416c81cc0 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