diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-01-12 20:20:27 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-01-12 20:20:27 -0500 |
commit | 31875bcfb7ccbbf6e88c2cc62714a2a3794994ec (patch) | |
tree | b3750a8c2f786afa433c0d41071478fe2a80ecc7 /src/libstore/build/derivation-goal.cc | |
parent | 0faf5326bd333eeef126730683dc02009a06402f (diff) |
Split `OutputsSpec::merge` into `OuputsSpec::{union_, isSubsetOf}`
Additionally get rid of the evil time we made an empty
`OutputSpec::Names()`.
Diffstat (limited to 'src/libstore/build/derivation-goal.cc')
-rw-r--r-- | src/libstore/build/derivation-goal.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc index 61169635a..2021d0023 100644 --- a/src/libstore/build/derivation-goal.cc +++ b/src/libstore/build/derivation-goal.cc @@ -144,9 +144,10 @@ void DerivationGoal::work() void DerivationGoal::addWantedOutputs(const OutputsSpec & outputs) { - bool newOutputs = wantedOutputs.merge(outputs); - if (newOutputs) + auto newWanted = wantedOutputs.union_(outputs); + if (!newWanted.isSubsetOf(wantedOutputs)) needRestart = true; + wantedOutputs = newWanted; } |