forked from lix-project/lix
parent
df3f5a78d5
commit
f0d6d67af9
|
@ -139,6 +139,7 @@ std::shared_ptr<FlakeRegistry> EvalState::getGlobalFlakeRegistry()
|
||||||
if (!hasPrefix(path, "/")) {
|
if (!hasPrefix(path, "/")) {
|
||||||
CachedDownloadRequest request(evalSettings.flakeRegistry);
|
CachedDownloadRequest request(evalSettings.flakeRegistry);
|
||||||
request.name = "flake-registry.json";
|
request.name = "flake-registry.json";
|
||||||
|
request.gcRoot = true;
|
||||||
path = getDownloader()->downloadCached(store, request).path;
|
path = getDownloader()->downloadCached(store, request).path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -913,6 +913,9 @@ CachedDownloadResult Downloader::downloadCached(
|
||||||
url, request.expectedHash.to_string(), gotHash.to_string());
|
url, request.expectedHash.to_string(), gotHash.to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (request.gcRoot)
|
||||||
|
store->addIndirectRoot(fileLink);
|
||||||
|
|
||||||
result.storePath = storePath;
|
result.storePath = storePath;
|
||||||
result.path = store->toRealPath(storePath);
|
result.path = store->toRealPath(storePath);
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -48,6 +48,7 @@ struct CachedDownloadRequest
|
||||||
std::string name;
|
std::string name;
|
||||||
Hash expectedHash;
|
Hash expectedHash;
|
||||||
unsigned int ttl = settings.tarballTtl;
|
unsigned int ttl = settings.tarballTtl;
|
||||||
|
bool gcRoot = false;
|
||||||
|
|
||||||
CachedDownloadRequest(const std::string & uri)
|
CachedDownloadRequest(const std::string & uri)
|
||||||
: uri(uri) { }
|
: uri(uri) { }
|
||||||
|
|
Loading…
Reference in a new issue