commit
37c61907d7
|
@ -72,11 +72,13 @@ static PathSet realisePath(StorePathWithOutputs path, bool build = true)
|
||||||
Derivation drv = store->derivationFromPath(path.path);
|
Derivation drv = store->derivationFromPath(path.path);
|
||||||
rootNr++;
|
rootNr++;
|
||||||
|
|
||||||
|
/* FIXME: Encode this empty special case explicitly in the type. */
|
||||||
if (path.outputs.empty())
|
if (path.outputs.empty())
|
||||||
for (auto & i : drv.outputs) path.outputs.insert(i.first);
|
for (auto & i : drv.outputs) path.outputs.insert(i.first);
|
||||||
|
|
||||||
PathSet outputs;
|
PathSet outputs;
|
||||||
for (auto & j : path.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);
|
DerivationOutputs::iterator i = drv.outputs.find(j);
|
||||||
if (i == drv.outputs.end())
|
if (i == drv.outputs.end())
|
||||||
throw Error("derivation '%s' does not have an output named '%s'",
|
throw Error("derivation '%s' does not have an output named '%s'",
|
||||||
|
@ -141,6 +143,7 @@ static void opRealise(Strings opFlags, Strings opArgs)
|
||||||
toDerivedPaths(paths),
|
toDerivedPaths(paths),
|
||||||
willBuild, willSubstitute, unknown, downloadSize, narSize);
|
willBuild, willSubstitute, unknown, downloadSize, narSize);
|
||||||
|
|
||||||
|
/* Filter out unknown paths from `paths`. */
|
||||||
if (ignoreUnknown) {
|
if (ignoreUnknown) {
|
||||||
std::vector<StorePathWithOutputs> paths2;
|
std::vector<StorePathWithOutputs> paths2;
|
||||||
for (auto & i : paths)
|
for (auto & i : paths)
|
||||||
|
|
Loading…
Reference in a new issue