diff options
author | Wout Mertens <Wout.Mertens@gmail.com> | 2014-10-28 23:10:26 +0100 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2014-10-31 11:13:03 +0100 |
commit | c04e49289871232ff3c2fd1239b64c2513f18fd1 (patch) | |
tree | 3c98bc2907a05cd18c803a947da7f4c75924cb80 /pkgs/stdenv/generic | |
parent | 114a775254da06d9833deb1d513b47afe0684d73 (diff) | |
download | nixlib-c04e49289871232ff3c2fd1239b64c2513f18fd1.tar nixlib-c04e49289871232ff3c2fd1239b64c2513f18fd1.tar.gz nixlib-c04e49289871232ff3c2fd1239b64c2513f18fd1.tar.bz2 nixlib-c04e49289871232ff3c2fd1239b64c2513f18fd1.tar.lz nixlib-c04e49289871232ff3c2fd1239b64c2513f18fd1.tar.xz nixlib-c04e49289871232ff3c2fd1239b64c2513f18fd1.tar.zst nixlib-c04e49289871232ff3c2fd1239b64c2513f18fd1.zip |
stdenv: Prevent issues like #4266
Don't preserve hardlinks, and instead use reflinks if they're available.
Diffstat (limited to 'pkgs/stdenv/generic')
-rw-r--r-- | pkgs/stdenv/generic/setup.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 24deac21c59f..fe801c6bb971 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -463,7 +463,9 @@ _defaultUnpack() { if [ -d "$fn" ]; then stripHash "$fn" - cp -prd --no-preserve=timestamps "$fn" $strippedName + # We can't preserve hardlinks because they may have been introduced by + # store optimization, which might break things in the build + cp -pr --reflink=auto --no-preserve=timestamps "$fn" $strippedName else |