aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/realisation.hh
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2021-05-19 10:26:58 +0200
committerregnat <rg@regnat.ovh>2021-05-26 16:59:09 +0200
commitaf3afd25eafb7866406aee04ef049121a3e3ffb0 (patch)
tree6557e026889b90fb3f076fd6ad7ed25d1d420e49 /src/libstore/realisation.hh
parenteca6ff06d611ef005e80d419e1b6050393fc056d (diff)
Add a method to compute the closure of a realisation
Only considers the closure in term of `Realisation`, ignores all the opaque inputs. Dunno whether that’s the nicest solution, need to think it through a bit
Diffstat (limited to 'src/libstore/realisation.hh')
-rw-r--r--src/libstore/realisation.hh3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstore/realisation.hh b/src/libstore/realisation.hh
index 1e2808ce3..776ab606c 100644
--- a/src/libstore/realisation.hh
+++ b/src/libstore/realisation.hh
@@ -38,6 +38,9 @@ struct Realisation {
bool checkSignature(const PublicKeys & publicKeys, const std::string & sig) const;
size_t checkSignatures(const PublicKeys & publicKeys) const;
+ static std::set<Realisation> closure(Store &, std::set<Realisation>);
+ static void closure(Store &, std::set<Realisation>, std::set<Realisation>& res);
+
StorePath getPath() const { return outPath; }
GENERATE_CMP(Realisation, me->id, me->outPath);