diff options
author | Taeer Bar-Yam <taeer.bar-yam@tweag.io> | 2023-01-16 10:37:04 -0500 |
---|---|---|
committer | Taeer Bar-Yam <taeer.bar-yam@tweag.io> | 2023-01-17 08:28:56 -0500 |
commit | b2752a4f74bf2697ed9be4e9cb913de03b1b1660 (patch) | |
tree | 82c607b01098645664d15aab745879d02952e1cb /src/nix-store | |
parent | 1df3d62c769dc68c279e89f68fdd3723ed3bcb5a (diff) |
add comments
Diffstat (limited to 'src/nix-store')
-rw-r--r-- | src/nix-store/nix-store.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index 3bbefedbe..6b79c373f 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -72,11 +72,13 @@ static PathSet realisePath(StorePathWithOutputs path, bool build = true) Derivation drv = store->derivationFromPath(path.path); rootNr++; + /* FIXME: Encode this empty special case explicitly in the type. */ if (path.outputs.empty()) for (auto & i : drv.outputs) path.outputs.insert(i.first); PathSet outputs; for (auto & j : path.outputs) { + /* Match outputs of a store path with outputs of the derivation that produces it. */ DerivationOutputs::iterator i = drv.outputs.find(j); if (i == drv.outputs.end()) throw Error("derivation '%s' does not have an output named '%s'", @@ -141,6 +143,7 @@ static void opRealise(Strings opFlags, Strings opArgs) toDerivedPaths(paths), willBuild, willSubstitute, unknown, downloadSize, narSize); + /* Filter out unknown paths from `paths`. */ if (ignoreUnknown) { std::vector<StorePathWithOutputs> paths2; for (auto & i : paths) |