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

getUri should be const and on Store::Config not Store

It is a side-effect property of the configuration alone, not the rest of
the store.
This commit is contained in:
John Ericson 2025-08-11 17:28:01 -04:00
parent f93d25c0e7
commit 0ef6f72c9c
33 changed files with 123 additions and 122 deletions

View file

@ -98,7 +98,7 @@ Goal::Co DrvOutputSubstitutionGoal::init()
"substituter '%s' has an incompatible realisation for '%s', ignoring.\n"
"Local: %s\n"
"Remote: %s",
sub->getUri(),
sub->config.getUri(),
depId.to_string(),
worker.store.printStorePath(localOutputInfo->outPath),
worker.store.printStorePath(depPath));

View file

@ -101,7 +101,7 @@ Goal::Co PathSubstitutionGoal::init()
} else {
printError(
"asked '%s' for '%s' but got '%s'",
sub->getUri(),
sub->config.getUri(),
worker.store.printStorePath(storePath),
sub->printStorePath(info->path));
continue;
@ -127,7 +127,7 @@ Goal::Co PathSubstitutionGoal::init()
warn(
"ignoring substitute for '%s' from '%s', as it's not signed by any of the keys in 'trusted-public-keys'",
worker.store.printStorePath(storePath),
sub->getUri());
sub->config.getUri());
continue;
}
@ -217,7 +217,8 @@ Goal::Co PathSubstitutionGoal::tryToRun(
/* Wake up the worker loop when we're done. */
Finally updateStats([this]() { outPipe.writeSide.close(); });
Activity act(*logger, actSubstitute, Logger::Fields{worker.store.printStorePath(storePath), sub->getUri()});
Activity act(
*logger, actSubstitute, Logger::Fields{worker.store.printStorePath(storePath), sub->config.getUri()});
PushActivity pact(act.id);
copyStorePath(*sub, worker.store, subPath, repair, sub->config.isTrusted ? NoCheckSigs : CheckSigs);