mirror of
https://github.com/NixOS/nix.git
synced 2025-11-14 22:42:41 +01:00
Rename makeFSSourceAccessor -> getFSSourceAccessor()
This makes it clearer that it returns a shared accessor object.
This commit is contained in:
parent
eab2919119
commit
ef28c7329c
7 changed files with 17 additions and 14 deletions
|
|
@ -2492,7 +2492,7 @@ SingleDrvOutputs LocalDerivationGoal::registerOutputs()
|
|||
HashModuloSink caSink { outputHash.hashAlgo, oldHashPart };
|
||||
auto fim = outputHash.method.getFileIngestionMethod();
|
||||
dumpPath(
|
||||
{makeFSSourceAccessor(), CanonPath(actualPath)},
|
||||
{getFSSourceAccessor(), CanonPath(actualPath)},
|
||||
caSink,
|
||||
(FileSerialisationMethod) fim);
|
||||
return caSink.finish().first;
|
||||
|
|
@ -2500,7 +2500,7 @@ SingleDrvOutputs LocalDerivationGoal::registerOutputs()
|
|||
case FileIngestionMethod::Git: {
|
||||
return git::dumpHash(
|
||||
outputHash.hashAlgo,
|
||||
{makeFSSourceAccessor(), CanonPath(tmpDir + "/tmp")}).hash;
|
||||
{getFSSourceAccessor(), CanonPath(tmpDir + "/tmp")}).hash;
|
||||
}
|
||||
}
|
||||
assert(false);
|
||||
|
|
@ -2528,7 +2528,7 @@ SingleDrvOutputs LocalDerivationGoal::registerOutputs()
|
|||
|
||||
{
|
||||
HashResult narHashAndSize = hashPath(
|
||||
{makeFSSourceAccessor(), CanonPath(actualPath)},
|
||||
{getFSSourceAccessor(), CanonPath(actualPath)},
|
||||
FileSerialisationMethod::Recursive, HashAlgorithm::SHA256);
|
||||
newInfo0.narHash = narHashAndSize.first;
|
||||
newInfo0.narSize = narHashAndSize.second;
|
||||
|
|
@ -2551,7 +2551,7 @@ SingleDrvOutputs LocalDerivationGoal::registerOutputs()
|
|||
std::string { requiredFinalPath.hashPart() });
|
||||
rewriteOutput(outputRewrites);
|
||||
HashResult narHashAndSize = hashPath(
|
||||
{makeFSSourceAccessor(), CanonPath(actualPath)},
|
||||
{getFSSourceAccessor(), CanonPath(actualPath)},
|
||||
FileSerialisationMethod::Recursive, HashAlgorithm::SHA256);
|
||||
ValidPathInfo newInfo0 { requiredFinalPath, narHashAndSize.first };
|
||||
newInfo0.narSize = narHashAndSize.second;
|
||||
|
|
|
|||
|
|
@ -1252,7 +1252,7 @@ StorePath LocalStore::addToStoreFromDump(
|
|||
methodsMatch
|
||||
? dumpHash
|
||||
: hashPath(
|
||||
{makeFSSourceAccessor(), CanonPath(tempPath)},
|
||||
{getFSSourceAccessor(), CanonPath(tempPath)},
|
||||
hashMethod.getFileIngestionMethod(), hashAlgo),
|
||||
{
|
||||
.others = references,
|
||||
|
|
@ -1392,7 +1392,7 @@ bool LocalStore::verifyStore(bool checkContents, RepairFlag repair)
|
|||
Path linkPath = linksDir + "/" + link.name;
|
||||
PosixSourceAccessor accessor;
|
||||
std::string hash = hashPath(
|
||||
{makeFSSourceAccessor(), CanonPath(linkPath)},
|
||||
{getFSSourceAccessor(), CanonPath(linkPath)},
|
||||
FileIngestionMethod::Recursive, HashAlgorithm::SHA256).to_string(HashFormat::Nix32, false);
|
||||
if (hash != link.name) {
|
||||
printError("link '%s' was modified! expected hash '%s', got '%s'",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue