diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-06-17 15:03:05 -0400 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2020-06-17 15:03:05 -0400 |
commit | 5e631e3304aaf00b912c12025debfd35942a0ca9 (patch) | |
tree | 5e504e4312f17ee1f12411bd8b979d6d53b5c192 /src/libstore/misc.cc | |
parent | be50de1142b0600afebde32130e8561e28b63b41 (diff) |
Add StorePathCAMap for querySubstitutablePathInfos
I’m not 100% sure this is wanted since it kind of makes everything
have to know about ca even if they don’t really want to. But it also
make things easier in dealing with looking up ca.
Diffstat (limited to 'src/libstore/misc.cc')
-rw-r--r-- | src/libstore/misc.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libstore/misc.cc b/src/libstore/misc.cc index 6902dfa0c..dc991e227 100644 --- a/src/libstore/misc.cc +++ b/src/libstore/misc.cc @@ -178,10 +178,7 @@ void Store::queryMissing(const std::vector<StorePathWithOutputs> & targets, auto outPath = parseStorePath(outPathS); SubstitutablePathInfos infos; - std::map<std::string, std::string> pathsCA = {}; - if (auto ca = getDerivationCA(*drv)) - pathsCA.insert({outPathS, *ca}); - querySubstitutablePathInfos({outPath}, infos, pathsCA); + querySubstitutablePathInfos({{outPath, getDerivationCA(*drv)}}, infos); if (infos.empty()) { drvState_->lock()->done = true; @@ -238,7 +235,7 @@ void Store::queryMissing(const std::vector<StorePathWithOutputs> & targets, if (isValidPath(path.path)) return; SubstitutablePathInfos infos; - querySubstitutablePathInfos({path.path}, infos); + querySubstitutablePathInfos({{path.path, std::nullopt}}, infos); if (infos.empty()) { auto state(state_.lock()); |