diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-09-02T12·54+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-09-02T12·54+0200 |
commit | 73332fd34224e184b4d9e7a88c69aae85946e4ed (patch) | |
tree | dba0dda3454b6ebebe84ce613eb7cfe6be9ef2bb /src/libstore | |
parent | d711fe8f5ea240a27fcfb4fba908cfcdb432f079 (diff) |
Filter build-chroot-dirs entries that conflict with derivation outputs
Fixes https://github.com/NixOS/nixpkgs/issues/9504. Note that this means we may have a non-functional /bin/sh in the chroot while rebuilding Bash or one of its dependencies. Ideally those packages don't rely on /bin/sh though.
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/build.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 0b00647046f8..c1163e63d90f 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -1998,13 +1998,13 @@ void DerivationGoal::startBuilder() } } - /* If we're repairing or checking, it's possible that we're + /* If we're repairing, checking or rebuilding part of a + multiple-outputs derivation, it's possible that we're rebuilding a path that is in settings.dirsInChroot (typically the dependencies of /bin/sh). Throw them out. */ - if (buildMode != bmNormal) - for (auto & i : drv->outputs) - dirsInChroot.erase(i.second.path); + for (auto & i : drv->outputs) + dirsInChroot.erase(i.second.path); #elif SANDBOX_ENABLED /* We don't really have any parent prep work to do (yet?) |