defaultUnpack: Preserve timestamps when copying files
Commit 6d928ab684327e0eeb1bf6cd889d57ca7127e8a7 changed this to not preserve timestamps. However, that results in non-determinism; in particular, it gives us a broken $SOURCE_DATE_EPOCH (especially for everything using fetchFromGitHub). Builds affected by timestamps < 1980 should be fixed in some other way (e.g. changing the timestamp to some fixed date > 1980).
This commit is contained in:
parent
de26cac3cb
commit
f4553d7219
@ -480,9 +480,11 @@ _defaultUnpack() {
|
|||||||
if [ -d "$fn" ]; then
|
if [ -d "$fn" ]; then
|
||||||
|
|
||||||
stripHash "$fn"
|
stripHash "$fn"
|
||||||
# We can't preserve hardlinks because they may have been introduced by
|
|
||||||
# store optimization, which might break things in the build
|
# We can't preserve hardlinks because they may have been
|
||||||
cp -pr --reflink=auto --no-preserve=timestamps "$fn" $strippedName
|
# introduced by store optimization, which might break things
|
||||||
|
# in the build.
|
||||||
|
cp -pr --reflink=auto "$fn" $strippedName
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user