mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +02:00
Merge commit '9dfb97c987
' into path-info
This commit is contained in:
commit
d5cef6c33a
35 changed files with 502 additions and 216 deletions
|
@ -54,13 +54,6 @@ StorePath Store::followLinksToStorePath(std::string_view path) const
|
|||
}
|
||||
|
||||
|
||||
StorePathWithOutputs Store::followLinksToStorePathWithOutputs(std::string_view path) const
|
||||
{
|
||||
auto [path2, outputs] = nix::parsePathWithOutputs(path);
|
||||
return StorePathWithOutputs { followLinksToStorePath(path2), std::move(outputs) };
|
||||
}
|
||||
|
||||
|
||||
/* Store paths have the following form:
|
||||
|
||||
<realized-path> = <store>/<h>-<name>
|
||||
|
@ -552,10 +545,10 @@ void Store::queryPathInfo(const StorePath & storePath,
|
|||
|
||||
void Store::substitutePaths(const StorePathSet & paths)
|
||||
{
|
||||
std::vector<StorePathWithOutputs> paths2;
|
||||
std::vector<BuildableReq> paths2;
|
||||
for (auto & path : paths)
|
||||
if (!path.isDerivation())
|
||||
paths2.push_back({path});
|
||||
paths2.push_back(BuildableOpaque{path});
|
||||
uint64_t downloadSize, narSize;
|
||||
StorePathSet willBuild, willSubstitute, unknown;
|
||||
queryMissing(paths2,
|
||||
|
@ -563,8 +556,8 @@ void Store::substitutePaths(const StorePathSet & paths)
|
|||
|
||||
if (!willSubstitute.empty())
|
||||
try {
|
||||
std::vector<StorePathWithOutputs> subs;
|
||||
for (auto & p : willSubstitute) subs.push_back({p});
|
||||
std::vector<BuildableReq> subs;
|
||||
for (auto & p : willSubstitute) subs.push_back(BuildableOpaque{p});
|
||||
buildPaths(subs);
|
||||
} catch (Error & e) {
|
||||
logWarning(e.info());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue