mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 07:46:21 +02:00
* Write build logs to disk again.
This commit is contained in:
parent
00aadf478b
commit
f5d5ffe536
1 changed files with 29 additions and 1 deletions
|
@ -87,6 +87,11 @@ public:
|
|||
|
||||
virtual void waiteeDone(GoalPtr waitee, bool success);
|
||||
|
||||
virtual void writeLog(int fd, const unsigned char * buf, size_t count)
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
void trace(const format & f);
|
||||
|
||||
protected:
|
||||
|
@ -395,6 +400,9 @@ private:
|
|||
/* Delete the temporary directory, if we have one. */
|
||||
void deleteTmpDir(bool force);
|
||||
|
||||
/* Callback used by the worker to write to the log. */
|
||||
void writeLog(int fd, const unsigned char * buf, size_t count);
|
||||
|
||||
string name();
|
||||
};
|
||||
|
||||
|
@ -1183,6 +1191,14 @@ void NormalisationGoal::deleteTmpDir(bool force)
|
|||
}
|
||||
|
||||
|
||||
void NormalisationGoal::writeLog(int fd,
|
||||
const unsigned char * buf, size_t count)
|
||||
{
|
||||
assert(fd == logPipe.readSide);
|
||||
writeFull(fdLogFile, buf, count);
|
||||
}
|
||||
|
||||
|
||||
string NormalisationGoal::name()
|
||||
{
|
||||
return (format("normalisation of `%1%'") % nePath).str();
|
||||
|
@ -1407,6 +1423,9 @@ public:
|
|||
void tryToRun();
|
||||
void finished();
|
||||
|
||||
/* Callback used by the worker to write to the log. */
|
||||
void writeLog(int fd, const unsigned char * buf, size_t count);
|
||||
|
||||
string name();
|
||||
};
|
||||
|
||||
|
@ -1645,6 +1664,15 @@ void SubstitutionGoal::finished()
|
|||
}
|
||||
|
||||
|
||||
void SubstitutionGoal::writeLog(int fd,
|
||||
const unsigned char * buf, size_t count)
|
||||
{
|
||||
assert(fd == logPipe.readSide);
|
||||
/* Don't write substitution output to a log file for now. We
|
||||
probably should, though. */
|
||||
}
|
||||
|
||||
|
||||
string SubstitutionGoal::name()
|
||||
{
|
||||
return (format("substitution of `%1%'") % storePath).str();
|
||||
|
@ -1922,7 +1950,7 @@ void Worker::waitForInput()
|
|||
} else {
|
||||
printMsg(lvlVomit, format("%1%: read %2% bytes")
|
||||
% goal->name() % rd);
|
||||
// writeFull(goal.fdLogFile, buffer, rd); !!!
|
||||
goal->writeLog(fd, buffer, (size_t) rd);
|
||||
if (verbosity >= buildVerbosity)
|
||||
writeFull(STDERR_FILENO, buffer, rd);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue