stdenv: don't preserve ownership information in defaultUnpack hook (#359873)
From the GNU coreutils manual <https://www.gnu.org/software/coreutils/manual/coreutils.html#index-_002dp-3>: Using --preserve with no attributes listed is equivalent to --preserve=mode,ownership,timestamps. Thus, what this patch drops is --preserve=ownership. Since the contents in the Nix store do not need ownership (they are owned by root), I think this is a fine patch to take.
This commit is contained in:
@@ -1211,7 +1211,7 @@ _defaultUnpack() {
|
||||
# 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 -- "$fn" "$destination"
|
||||
cp -r --preserve=mode,timestamps --reflink=auto -- "$fn" "$destination"
|
||||
|
||||
else
|
||||
|
||||
|
||||
Reference in New Issue
Block a user