Clarify comment on sandbox and temp fresh paths

This commit is contained in:
John Ericson 2020-08-11 22:46:05 +00:00
parent 6d57139050
commit 4c6aac8fdf

View file

@ -2370,9 +2370,11 @@ void DerivationGoal::startBuilder()
(typically the dependencies of /bin/sh). Throw them (typically the dependencies of /bin/sh). Throw them
out. */ out. */
for (auto & i : drv->outputs) { for (auto & i : drv->outputs) {
/* If the name isn't known a priori (i.e. floating content-addressed /* If the name isn't known a priori (i.e. floating
derivation), the temporary location we use should be fresh and content-addressed derivation), the temporary location we use
never in the sandbox in the first place. */ 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); auto optPath = i.second.pathOpt(worker.store, drv->name);
if (optPath) if (optPath)
dirsInChroot.erase(worker.store.printStorePath(*optPath)); dirsInChroot.erase(worker.store.printStorePath(*optPath));