From e2d330aeed19a1bfed56ea55277ac9400fbc7fed Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Sun, 11 Aug 2024 21:53:29 +0200 Subject: libstore: remove DerivationGoal::isReadDesc all derivation goals need a log fd of some description. let's save this single fd in a dedicated pointer field for all subclasses so that later we have just the one spot to change if we turn this into async promises Change-Id: If223adf90909247363fb823d751cae34d25d0c0b --- src/libstore/build/derivation-goal.hh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/libstore/build/derivation-goal.hh') diff --git a/src/libstore/build/derivation-goal.hh b/src/libstore/build/derivation-goal.hh index 250b437da..da935ceb5 100644 --- a/src/libstore/build/derivation-goal.hh +++ b/src/libstore/build/derivation-goal.hh @@ -186,6 +186,13 @@ struct DerivationGoal : public Goal */ std::unique_ptr hook; + /** + * Builder output is pulled from this file descriptor when not null. + * Owned by the derivation goal or subclass, must not be reset until + * the build has finished and no more output must be processed by us + */ + AutoCloseFD * builderOutFD = nullptr; + /** * The sort of derivation we are building. */ @@ -290,8 +297,6 @@ struct DerivationGoal : public Goal virtual void cleanupPostOutputsRegisteredModeCheck(); virtual void cleanupPostOutputsRegisteredModeNonCheck(); - virtual bool isReadDesc(int fd); - /** * Callback used by the worker to write to the log. */ -- cgit v1.2.3