diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-08-11 22:46:05 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-08-11 22:46:05 +0000 |
commit | 4c6aac8fdf2cbc85280115da53acebb910d2e60c (patch) | |
tree | f62a90f78fba3617171486817cea687e6d7eef0b /src/libstore/build.cc | |
parent | 6d571390500431904d1ca1621fb6791fc25522f1 (diff) |
Clarify comment on sandbox and temp fresh paths
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r-- | src/libstore/build.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 142149ae3..d2bfc73c9 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -2370,9 +2370,11 @@ void DerivationGoal::startBuilder() (typically the dependencies of /bin/sh). Throw them out. */ for (auto & i : drv->outputs) { - /* If the name isn't known a priori (i.e. floating content-addressed - derivation), the temporary location we use should be fresh and - never in the sandbox in the first place. */ + /* If the name isn't known a priori (i.e. floating + content-addressed derivation), the temporary location we use + should be fresh. Freshness means it is impossible that the path + is already in the sandbox, so we don't need to worry about + removing it. */ auto optPath = i.second.pathOpt(worker.store, drv->name); if (optPath) dirsInChroot.erase(worker.store.printStorePath(*optPath)); |