From 2bd069cdecb5371d906f8df9f5fb36f308d6296f Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 12 Mar 2024 18:23:35 +0100 Subject: 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. --- src/buildtool/serve_api/serve_service/source_tree.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/buildtool/serve_api/serve_service/source_tree.cpp') 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 " -- cgit v1.2.3