summaryrefslogtreecommitdiff
path: root/src/other_tools/repo_map
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-07-13 11:41:07 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-08-07 17:01:01 +0200
commit317cb72c64330036f23fd19a7caf65637bac5bc1 (patch)
tree4760afa62324c21b491933d9be6849b951769fa2 /src/other_tools/repo_map
parent19aa5015df60e0b9eccf1a93afb0d9776692f5d3 (diff)
downloadjustbuild-317cb72c64330036f23fd19a7caf65637bac5bc1.tar.gz
just-mr: Update async map keys with the 'special' pragma value
For 'file' and 'archive' checkouts we will handle more than just the 'ignore' value.
Diffstat (limited to 'src/other_tools/repo_map')
-rw-r--r--src/other_tools/repo_map/repos_to_setup_map.cpp14
1 files changed, 8 insertions, 6 deletions
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 a07ebaa6..69addd88 100644
--- a/src/other_tools/repo_map/repos_to_setup_map.cpp
+++ b/src/other_tools/repo_map/repos_to_setup_map.cpp
@@ -210,7 +210,7 @@ void ArchiveCheckout(ExpressionPtr const& repo_desc,
.origin_from_distdir = false},
.repo_type = repo_type,
.subdir = subdir.empty() ? "." : subdir.string(),
- .ignore_special = pragma_special_value == PragmaSpecial::Ignore};
+ .pragma_special = pragma_special_value};
// get the WS root as git tree
content_git_map->ConsumeAfterKeysReady(
ts,
@@ -278,12 +278,14 @@ void FileCheckout(ExpressionPtr const& repo_desc,
// check "to_git" pragma
auto pragma_to_git =
repo_desc_pragma ? repo_desc_pragma->get()->At("to_git") : std::nullopt;
- if (pragma_to_git and pragma_to_git->get()->IsBool() and
- pragma_to_git->get()->Bool()) {
+ // resolving symlinks implies also to_git
+ if (pragma_special_value == PragmaSpecial::ResolvePartially or
+ pragma_special_value == PragmaSpecial::ResolveCompletely or
+ (pragma_to_git and pragma_to_git->get()->IsBool() and
+ pragma_to_git->get()->Bool())) {
// get the WS root as git tree
- FpathInfo fpath_info = {
- .fpath = fpath,
- .ignore_special = pragma_special_value == PragmaSpecial::Ignore};
+ FpathInfo fpath_info = {.fpath = fpath,
+ .pragma_special = pragma_special_value};
fpath_git_map->ConsumeAfterKeysReady(
ts,
{std::move(fpath_info)},