diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-03-12 18:23:35 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-03-13 12:14:53 +0100 |
commit | 2bd069cdecb5371d906f8df9f5fb36f308d6296f (patch) | |
tree | 3db2cee634411639d520b2dee796b8a97b7342f6 /src/buildtool/serve_api/serve_service/source_tree.cpp | |
parent | f487f592fdc85fbdb95856abb7f4281dd4353da9 (diff) | |
download | justbuild-2bd069cdecb5371d906f8df9f5fb36f308d6296f.tar.gz |
Move storage-aware tmpdir creation to config
... as the fs_utils have a lot more dependencies making them usable
in less places. Moreover, this function also serves to shape the
layout of the local build root and hence is more appropriately
placed in the config anyway.
Diffstat (limited to 'src/buildtool/serve_api/serve_service/source_tree.cpp')
-rw-r--r-- | src/buildtool/serve_api/serve_service/source_tree.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buildtool/serve_api/serve_service/source_tree.cpp b/src/buildtool/serve_api/serve_service/source_tree.cpp index 4941f786..5156ce9c 100644 --- a/src/buildtool/serve_api/serve_service/source_tree.cpp +++ b/src/buildtool/serve_api/serve_service/source_tree.cpp @@ -806,7 +806,7 @@ auto SourceTreeService::ServeArchiveTree( } } // extract archive - auto tmp_dir = StorageUtils::CreateTypedTmpDir(archive_type); + auto tmp_dir = StorageConfig::CreateTypedTmpDir(archive_type); if (not tmp_dir) { auto str = fmt::format( "Failed to create tmp path for {} archive with content {}", @@ -845,7 +845,7 @@ auto SourceTreeService::DistdirImportToGit( bool sync_tree, ServeDistdirTreeResponse* response) -> ::grpc::Status { // create tmp directory for the distdir - auto distdir_tmp_dir = StorageUtils::CreateTypedTmpDir("distdir"); + auto distdir_tmp_dir = StorageConfig::CreateTypedTmpDir("distdir"); if (not distdir_tmp_dir) { auto str = fmt::format( "Failed to create tmp path for distdir target {}", content_id); @@ -1546,7 +1546,7 @@ auto SourceTreeService::CheckRootTree( // As we currently build only against roots in Git repositories, we need // to move the tree from CAS to local Git storage auto tmp_dir = - StorageUtils::CreateTypedTmpDir("source-tree-check-root-tree"); + StorageConfig::CreateTypedTmpDir("source-tree-check-root-tree"); if (not tmp_dir) { auto str = fmt::format( "Failed to create tmp directory for copying " @@ -1621,7 +1621,7 @@ auto SourceTreeService::GetRemoteTree( return ::grpc::Status::OK; } auto tmp_dir = - StorageUtils::CreateTypedTmpDir("source-tree-get-remote-tree"); + StorageConfig::CreateTypedTmpDir("source-tree-get-remote-tree"); if (not tmp_dir) { auto str = fmt::format( "Failed to create tmp directory for copying git-tree {} from " |