summaryrefslogtreecommitdiff
path: root/src/other_tools/repo_map
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-09-11 12:19:15 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-09-11 14:52:07 +0200
commit09a400e7a6ae4882ef770bf7eba3887050601ee8 (patch)
tree2d54d6ff3985619d47ce8ae423853afc51f4ca3f /src/other_tools/repo_map
parentc34e0b72616c99a4704efc3950351c84487903ca (diff)
downloadjustbuild-09a400e7a6ae4882ef770bf7eba3887050601ee8.tar.gz
Store HashInfo in just-mr's ArchiveContent as content hash
...and use it to create ArtifactDigests.
Diffstat (limited to 'src/other_tools/repo_map')
-rw-r--r--src/other_tools/repo_map/TARGETS1
-rw-r--r--src/other_tools/repo_map/repos_to_setup_map.cpp7
2 files changed, 6 insertions, 2 deletions
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));
}