mirror of
https://github.com/NixOS/nix.git
synced 2025-02-16 17:02:28 +00:00
Sync tarball cache within tarball cache Activity
This commit is contained in:
parent
d0f8a92363
commit
97ff2ed455
@ -261,11 +261,12 @@ struct GitArchiveInputScheme : InputScheme
|
|||||||
auto tarballCache = getTarballCache();
|
auto tarballCache = getTarballCache();
|
||||||
auto parseSink = tarballCache->getFileSystemObjectSink();
|
auto parseSink = tarballCache->getFileSystemObjectSink();
|
||||||
auto lastModified = unpackTarfileToSink(archive, *parseSink);
|
auto lastModified = unpackTarfileToSink(archive, *parseSink);
|
||||||
|
auto tree = parseSink->sync();
|
||||||
|
|
||||||
act.reset();
|
act.reset();
|
||||||
|
|
||||||
TarballInfo tarballInfo {
|
TarballInfo tarballInfo {
|
||||||
.treeHash = tarballCache->dereferenceSingletonDirectory(parseSink->sync()),
|
.treeHash = tarballCache->dereferenceSingletonDirectory(tree),
|
||||||
.lastModified = lastModified
|
.lastModified = lastModified
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -170,6 +170,7 @@ static DownloadTarballResult downloadTarball_(
|
|||||||
auto tarballCache = getTarballCache();
|
auto tarballCache = getTarballCache();
|
||||||
auto parseSink = tarballCache->getFileSystemObjectSink();
|
auto parseSink = tarballCache->getFileSystemObjectSink();
|
||||||
auto lastModified = unpackTarfileToSink(archive, *parseSink);
|
auto lastModified = unpackTarfileToSink(archive, *parseSink);
|
||||||
|
auto tree = parseSink->sync();
|
||||||
|
|
||||||
act.reset();
|
act.reset();
|
||||||
|
|
||||||
@ -184,7 +185,7 @@ static DownloadTarballResult downloadTarball_(
|
|||||||
} else {
|
} else {
|
||||||
infoAttrs.insert_or_assign("etag", res->etag);
|
infoAttrs.insert_or_assign("etag", res->etag);
|
||||||
infoAttrs.insert_or_assign("treeHash",
|
infoAttrs.insert_or_assign("treeHash",
|
||||||
tarballCache->dereferenceSingletonDirectory(parseSink->sync()).gitRev());
|
tarballCache->dereferenceSingletonDirectory(tree).gitRev());
|
||||||
infoAttrs.insert_or_assign("lastModified", uint64_t(lastModified));
|
infoAttrs.insert_or_assign("lastModified", uint64_t(lastModified));
|
||||||
if (res->immutableUrl)
|
if (res->immutableUrl)
|
||||||
infoAttrs.insert_or_assign("immutableUrl", *res->immutableUrl);
|
infoAttrs.insert_or_assign("immutableUrl", *res->immutableUrl);
|
||||||
|
Loading…
Reference in New Issue
Block a user