diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-03-01 16:57:36 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-04-07 08:34:58 -0400 |
commit | 4e9f32f993aaa9f7995919e480e0e920d946184d (patch) | |
tree | d8947a5032185b7e9ecbfb5e2740a784416a7155 /src/libstore/derivations.hh | |
parent | b200784cec056da53378eb043cae4fad188e4e6f (diff) |
Liberate `checkDerivationOutputs` from `LocalStore`
Make it instead a method on `Derivation` that can work with any store.
We will need this for a CLI command to create a derivation.
Diffstat (limited to 'src/libstore/derivations.hh')
-rw-r--r-- | src/libstore/derivations.hh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh index 38727d77a..9e7ceeb5d 100644 --- a/src/libstore/derivations.hh +++ b/src/libstore/derivations.hh @@ -333,6 +333,14 @@ struct Derivation : BasicDerivation Store & store, const std::map<std::pair<StorePath, std::string>, StorePath> & inputDrvOutputs) const; + /* Check that the derivation is valid and does not present any + illegal states. + + This is mainly a matter of checking the outputs, where our C++ + representation supports all sorts of combinations we do not yet + allow. */ + void checkInvariants(Store & store, const StorePath & drvPath) const; + Derivation() = default; Derivation(const BasicDerivation & bd) : BasicDerivation(bd) { } Derivation(BasicDerivation && bd) : BasicDerivation(std::move(bd)) { } |