mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 12:06:01 +01:00
Give DerivationBuilderImpl::cleanupBuild bool arg
Do this to match `DerivationBuilder::deleteTmpDir`, which we'll want to combine it with next. Also chenge one caller from `deleteTmpDir(true)` to `cleanupBuild(true)` now that this is done, because it will not make a difference. This should be a pure refactor with no behavioral change.
This commit is contained in:
parent
8dd289099c
commit
4db6bf96b7
2 changed files with 10 additions and 7 deletions
|
|
@ -166,9 +166,12 @@ struct ChrootDerivationBuilder : virtual DerivationBuilderImpl
|
|||
return !needsHashRewrite() ? chrootRootDir + p : store.toRealPath(p);
|
||||
}
|
||||
|
||||
void cleanupBuild() override
|
||||
void cleanupBuild(bool force) override
|
||||
{
|
||||
DerivationBuilderImpl::cleanupBuild();
|
||||
DerivationBuilderImpl::cleanupBuild(force);
|
||||
|
||||
if (force)
|
||||
return;
|
||||
|
||||
/* Move paths out of the chroot for easier debugging of
|
||||
build failures. */
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
virtual void cleanupBuild();
|
||||
virtual void cleanupBuild(bool force);
|
||||
|
||||
private:
|
||||
|
||||
|
|
@ -480,7 +480,7 @@ SingleDrvOutputs DerivationBuilderImpl::unprepareBuild()
|
|||
|
||||
bool diskFull = decideWhetherDiskFull();
|
||||
|
||||
cleanupBuild();
|
||||
cleanupBuild(false);
|
||||
|
||||
auto msg =
|
||||
fmt("Cannot build '%s'.\n"
|
||||
|
|
@ -508,14 +508,14 @@ SingleDrvOutputs DerivationBuilderImpl::unprepareBuild()
|
|||
for (auto & i : redirectedOutputs)
|
||||
deletePath(store.Store::toRealPath(i.second));
|
||||
|
||||
deleteTmpDir(true);
|
||||
cleanupBuild(true);
|
||||
|
||||
return builtOutputs;
|
||||
}
|
||||
|
||||
void DerivationBuilderImpl::cleanupBuild()
|
||||
void DerivationBuilderImpl::cleanupBuild(bool force)
|
||||
{
|
||||
deleteTmpDir(false);
|
||||
deleteTmpDir(force);
|
||||
}
|
||||
|
||||
static void chmod_(const Path & path, mode_t mode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue