diff options
Diffstat (limited to 'src/libfetchers/tarball.cc')
-rw-r--r-- | src/libfetchers/tarball.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/libfetchers/tarball.cc b/src/libfetchers/tarball.cc index c933475ca..dde0ad761 100644 --- a/src/libfetchers/tarball.cc +++ b/src/libfetchers/tarball.cc @@ -13,7 +13,7 @@ DownloadFileResult downloadFile( ref<Store> store, const std::string & url, const std::string & name, - bool immutable, + bool locked, const Headers & headers) { // FIXME: check store @@ -88,7 +88,7 @@ DownloadFileResult downloadFile( inAttrs, infoAttrs, *storePath, - immutable); + locked); if (url != res.effectiveUri) getCache()->add( @@ -100,7 +100,7 @@ DownloadFileResult downloadFile( }, infoAttrs, *storePath, - immutable); + locked); return { .storePath = std::move(*storePath), @@ -113,7 +113,7 @@ std::pair<Tree, time_t> downloadTarball( ref<Store> store, const std::string & url, const std::string & name, - bool immutable, + bool locked, const Headers & headers) { Attrs inAttrs({ @@ -126,11 +126,11 @@ std::pair<Tree, time_t> downloadTarball( if (cached && !cached->expired) return { - Tree(store->toRealPath(cached->storePath), std::move(cached->storePath)), + Tree { .actualPath = store->toRealPath(cached->storePath), .storePath = std::move(cached->storePath) }, getIntAttr(cached->infoAttrs, "lastModified") }; - auto res = downloadFile(store, url, name, immutable, headers); + auto res = downloadFile(store, url, name, locked, headers); std::optional<StorePath> unpackedStorePath; time_t lastModified; @@ -160,10 +160,10 @@ std::pair<Tree, time_t> downloadTarball( inAttrs, infoAttrs, *unpackedStorePath, - immutable); + locked); return { - Tree(store->toRealPath(*unpackedStorePath), std::move(*unpackedStorePath)), + Tree { .actualPath = store->toRealPath(*unpackedStorePath), .storePath = std::move(*unpackedStorePath) }, lastModified, }; } @@ -202,7 +202,7 @@ struct TarballInputScheme : InputScheme Input input; input.attrs = attrs; - //input.immutable = (bool) maybeGetStrAttr(input.attrs, "hash"); + //input.locked = (bool) maybeGetStrAttr(input.attrs, "hash"); return input; } @@ -225,10 +225,10 @@ struct TarballInputScheme : InputScheme return true; } - std::pair<Tree, Input> fetch(ref<Store> store, const Input & input) override + std::pair<StorePath, Input> fetch(ref<Store> store, const Input & input) override { auto tree = downloadTarball(store, getStrAttr(input.attrs, "url"), input.getName(), false).first; - return {std::move(tree), input}; + return {std::move(tree.storePath), input}; } }; |