diff options
author | regnat <rg@regnat.ovh> | 2021-06-22 10:50:28 +0200 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2021-06-23 11:27:16 +0200 |
commit | c878cee8954151aaa1054af7ef3746a979b05832 (patch) | |
tree | 434d61cbfa8672dd1c729fb331fdb15942264bb6 /src/libstore/realisation.cc | |
parent | 16fb7d8d95a8bc81e7df885ab4167c8a03f1dddf (diff) |
Assert that compatible realisations have the same dependencies
Should always hold, but that’s not necessarily obvious, so better
enforce it
Diffstat (limited to 'src/libstore/realisation.cc')
-rw-r--r-- | src/libstore/realisation.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/realisation.cc b/src/libstore/realisation.cc index 76aec74ce..eadec594c 100644 --- a/src/libstore/realisation.cc +++ b/src/libstore/realisation.cc @@ -143,7 +143,11 @@ StorePath RealisedPath::path() const { bool Realisation::isCompatibleWith(const Realisation & other) const { assert (id == other.id); - return outPath == other.outPath; + if (outPath == other.outPath) { + assert(dependentRealisations == other.dependentRealisations); + return true; + } + return false; } void RealisedPath::closure( |