mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 07:22:43 +01:00
Combine cleanupBuild and deleteTmpDir
It's hard to tell if I changed any behavior, but if I did, I think I made it better, because now we explicitly move stuff out of the chroot (if we were going to) before trying to delete the chroot.
This commit is contained in:
parent
4db6bf96b7
commit
557bbe969e
4 changed files with 10 additions and 24 deletions
|
|
@ -344,14 +344,10 @@ private:
|
|||
|
||||
public:
|
||||
|
||||
void deleteTmpDir(bool force) override;
|
||||
void cleanupBuild(bool force) override;
|
||||
|
||||
void killSandbox(bool getStats) override;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void cleanupBuild(bool force);
|
||||
|
||||
private:
|
||||
|
||||
bool decideWhetherDiskFull();
|
||||
|
|
@ -513,11 +509,6 @@ SingleDrvOutputs DerivationBuilderImpl::unprepareBuild()
|
|||
return builtOutputs;
|
||||
}
|
||||
|
||||
void DerivationBuilderImpl::cleanupBuild(bool force)
|
||||
{
|
||||
deleteTmpDir(force);
|
||||
}
|
||||
|
||||
static void chmod_(const Path & path, mode_t mode)
|
||||
{
|
||||
if (chmod(path.c_str(), mode) == -1)
|
||||
|
|
@ -1821,7 +1812,7 @@ SingleDrvOutputs DerivationBuilderImpl::registerOutputs()
|
|||
return builtOutputs;
|
||||
}
|
||||
|
||||
void DerivationBuilderImpl::deleteTmpDir(bool force)
|
||||
void DerivationBuilderImpl::cleanupBuild(bool force)
|
||||
{
|
||||
if (topTmpDir != "") {
|
||||
/* As an extra precaution, even in the event of `deletePath` failing to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue