diff options
author | regnat <rg@regnat.ovh> | 2021-05-05 21:00:08 +0200 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2021-05-05 21:00:08 +0200 |
commit | bf485dcf460cd0df113c33f36c9f1f29d6e3a2d5 (patch) | |
tree | cbf07d9aed98b446e887d0432ef47356f6db67d0 /src | |
parent | fe3a10a9b2c61ba19b24da4c93c4abc9e7583f3d (diff) |
Properly normalize the content-addressed paths
Make sure that their timestamp are always normalized.
Otherwise, strange − and non-deterministic − things might happen, like
https://github.com/NixOS/nixpkgs/issues/121813
Fix #4775
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/build/local-derivation-goal.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc index 4a67b3f47..9c14c06b4 100644 --- a/src/libstore/build/local-derivation-goal.cc +++ b/src/libstore/build/local-derivation-goal.cc @@ -2300,10 +2300,6 @@ void LocalDerivationGoal::registerOutputs() sink.s = make_ref<std::string>(rewriteStrings(*sink.s, outputRewrites)); StringSource source(*sink.s); restorePath(actualPath, source); - - /* FIXME: set proper permissions in restorePath() so - we don't have to do another traversal. */ - canonicalisePathMetaData(actualPath, -1, inodesSeen); } }; @@ -2452,6 +2448,10 @@ void LocalDerivationGoal::registerOutputs() }, }, output.output); + /* FIXME: set proper permissions in restorePath() so + we don't have to do another traversal. */ + canonicalisePathMetaData(actualPath, -1, inodesSeen); + /* Calculate where we'll move the output files. In the checking case we will leave leave them where they are, for now, rather than move to their usual "final destination" */ |