aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2020-06-17 14:04:46 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2020-06-17 14:04:46 -0400
commit8974755d1958824e732640f8131b0ed22ebd703b (patch)
treeeeb9b190e348b43655e24f10083a58383fb07d7b /src/libstore/build.cc
parent7bd88cc1dc746ed2883e1eaebb3230ec2c2bb035 (diff)
Add assert for replaced storePath
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 9753db7b1..bc67ae31e 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -4409,8 +4409,11 @@ void SubstitutionGoal::tryNext()
subs.pop_front();
auto subPath = storePath;
- if (ca && (hasPrefix(*ca, "fixed:") || hasPrefix(*ca, "text:")))
+ if (ca && (hasPrefix(*ca, "fixed:") || hasPrefix(*ca, "text:"))) {
subPath = sub->makeFixedOutputPathFromCA(storePath.name(), *ca);
+ if (sub->storeDir == worker.store.storeDir)
+ assert(subPath == storePath);
+ }
try {
// FIXME: make async
@@ -4535,8 +4538,11 @@ void SubstitutionGoal::tryToRun()
PushActivity pact(act.id);
auto subPath = storePath;
- if (ca && (hasPrefix(*ca, "fixed:") || hasPrefix(*ca, "text:")))
+ if (ca && (hasPrefix(*ca, "fixed:") || hasPrefix(*ca, "text:"))) {
subPath = sub->makeFixedOutputPathFromCA(storePath.name(), *ca);
+ if (sub->storeDir == worker.store.storeDir)
+ assert(subPath == storePath);
+ }
copyStorePath(ref<Store>(sub), ref<Store>(worker.store.shared_from_this()),
subPath, repair, sub->isTrusted ? NoCheckSigs : CheckSigs);