1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

Debug when storePath changes

these rewrites should be transparent, but they are important to know
about when debugging
This commit is contained in:
Matthew Bauer 2020-06-12 15:32:52 -05:00
parent e3cb536f19
commit 88120442d2
2 changed files with 8 additions and 3 deletions

View file

@ -661,6 +661,8 @@ void copyPaths(ref<Store> srcStore, ref<Store> dstStore, const StorePathSet & st
FileIngestionMethod ingestionMethod { info->ca.compare(6, 2, "r:") == 0 };
Hash hash(std::string(info->ca, ingestionMethod == FileIngestionMethod::Recursive ? 8 : 6));
storePathForDst = dstStore->makeFixedOutputPath(ingestionMethod, hash, storePath.name());
if (storePathForDst != storePath)
debug("rewriting path '%s' to '%s' for substituter '%s'", srcStore->printStorePath(storePath), dstStore->printStorePath(storePathForDst), dstStore->getUri());
}
if (dstStore->isValidPath(storePathForDst)) {
@ -687,6 +689,8 @@ void copyPaths(ref<Store> srcStore, ref<Store> dstStore, const StorePathSet & st
FileIngestionMethod ingestionMethod { info->ca.compare(6, 2, "r:") == 0 };
Hash hash(std::string(info->ca, ingestionMethod == FileIngestionMethod::Recursive ? 8 : 6));
storePathForDst = dstStore->makeFixedOutputPath(ingestionMethod, hash, storePath.name());
if (storePathForDst != storePath)
debug("rewriting path '%s' to '%s' for substituter '%s'", srcStore->printStorePath(storePath), dstStore->printStorePath(storePathForDst), dstStore->getUri());
}
if (!dstStore->isValidPath(storePathForDst)) {