diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-26 13:05:35 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-05 12:58:35 +0200 |
commit | 3440784e94de51c95d3dcca8509f8e46b4722ee6 (patch) | |
tree | 42b096e1766aa3706adf02b93508d721bed66efd /src/other_tools/ops_maps | |
parent | 595b7c27d175b56bd296b33dc535818a05cdbadd (diff) | |
download | justbuild-3440784e94de51c95d3dcca8509f8e46b4722ee6.tar.gz |
Pass Storage and StorageConfig to StorageUtils by reference
Diffstat (limited to 'src/other_tools/ops_maps')
-rw-r--r-- | src/other_tools/ops_maps/TARGETS | 1 | ||||
-rw-r--r-- | src/other_tools/ops_maps/content_cas_map.cpp | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/other_tools/ops_maps/TARGETS b/src/other_tools/ops_maps/TARGETS index 205e7b83..01152ed9 100644 --- a/src/other_tools/ops_maps/TARGETS +++ b/src/other_tools/ops_maps/TARGETS @@ -79,6 +79,7 @@ , ["src/other_tools/git_operations", "git_repo_remote"] , ["src/other_tools/just_mr/progress_reporting", "statistics"] , ["src/other_tools/just_mr/progress_reporting", "progress"] + , ["src/buildtool/storage", "storage"] ] } , "archive_fetch_map": diff --git a/src/other_tools/ops_maps/content_cas_map.cpp b/src/other_tools/ops_maps/content_cas_map.cpp index 8877a547..59a22327 100644 --- a/src/other_tools/ops_maps/content_cas_map.cpp +++ b/src/other_tools/ops_maps/content_cas_map.cpp @@ -75,7 +75,7 @@ void FetchFromNetwork(ArchiveContent const& key, } } // add the fetched data to CAS - auto path = StorageUtils::AddToCAS(*data); + auto path = StorageUtils::AddToCAS(Storage::Instance(), *data); // check one last time if content is in CAS now if (not path) { (*logger)(fmt::format("Failed to store fetched content from {}", @@ -206,7 +206,8 @@ auto CreateContentCASMap( : std::filesystem::path(key.fetch_url) .filename() .string()); - StorageUtils::AddDistfileToCAS(repo_distfile, just_mr_paths); + StorageUtils::AddDistfileToCAS( + Storage::Instance(), repo_distfile, just_mr_paths); // check if content is in CAS now if (cas.BlobPath(digest, /*is_executable=*/false)) { JustMRProgress::Instance().TaskTracker().Stop(key.origin); |