1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-15 23:12:44 +01:00

Add assert for replaced storePath

This commit is contained in:
Matthew Bauer 2020-06-17 14:04:46 -04:00
parent 7bd88cc1dc
commit 8974755d19
3 changed files with 16 additions and 2 deletions

View file

@ -853,6 +853,8 @@ void LocalStore::querySubstitutablePathInfos(const StorePathSet & paths,
// recompute store path so that we can use a different store root
if (ca != pathsCA.end() && (hasPrefix(ca->second, "fixed:") || hasPrefix(ca->second, "text:"))) {
subPath = makeFixedOutputPathFromCA(path.name(), ca->second);
if (sub->storeDir == storeDir)
assert(subPath == path);
if (subPath != path)
debug("replaced path '%s' with '%s' for substituter '%s'", printStorePath(path), sub->printStorePath(subPath), sub->getUri());
} else if (sub->storeDir != storeDir) continue;