From 09a400e7a6ae4882ef770bf7eba3887050601ee8 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Wed, 11 Sep 2024 12:19:15 +0200 Subject: Store HashInfo in just-mr's ArchiveContent as content hash ...and use it to create ArtifactDigests. --- src/other_tools/repo_map/TARGETS | 1 + src/other_tools/repo_map/repos_to_setup_map.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src/other_tools/repo_map') diff --git a/src/other_tools/repo_map/TARGETS b/src/other_tools/repo_map/TARGETS index dd938a5b..9f75dc93 100644 --- a/src/other_tools/repo_map/TARGETS +++ b/src/other_tools/repo_map/TARGETS @@ -27,6 +27,7 @@ , ["src/other_tools/utils", "parse_archive"] , ["src/other_tools/utils", "parse_git_tree"] , ["src/buildtool/crypto", "hash_function"] + , ["src/buildtool/crypto", "hash_info"] ] } } diff --git a/src/other_tools/repo_map/repos_to_setup_map.cpp b/src/other_tools/repo_map/repos_to_setup_map.cpp index 02ee6311..cd0849fb 100644 --- a/src/other_tools/repo_map/repos_to_setup_map.cpp +++ b/src/other_tools/repo_map/repos_to_setup_map.cpp @@ -19,6 +19,7 @@ #include "fmt/core.h" #include "src/buildtool/crypto/hash_function.hpp" +#include "src/buildtool/crypto/hash_info.hpp" #include "src/buildtool/file_system/file_root.hpp" #include "src/buildtool/file_system/symlinks_map/pragma_special.hpp" #include "src/buildtool/logging/log_level.hpp" @@ -514,8 +515,10 @@ void DistdirCheckout(ExpressionPtr const& repo_desc, .filename() .string()); distdir_content_for_id->insert_or_assign( - repo_distfile, std::make_pair(archive->content, false)); - distdir_content->insert_or_assign(repo_distfile, archive->content); + repo_distfile, + std::make_pair(archive->content_hash.Hash(), false)); + distdir_content->insert_or_assign(repo_distfile, + archive->content_hash.Hash()); // add to fetch list dist_repos_to_fetch->emplace_back(*std::move(archive)); } -- cgit v1.2.3