diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-09-25 12:15:33 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-11-02 12:06:50 +0100 |
commit | b9d9dd5fb1bea1a45537365c8ab793bd8d19ed75 (patch) | |
tree | f28f1f3a9cbf02872a6be675d56455da68002997 /src | |
parent | 8d3d3a3dd8bda9f132dc3f15106c2f11bf22438b (diff) | |
download | justbuild-b9d9dd5fb1bea1a45537365c8ab793bd8d19ed75.tar.gz |
content CAS map: Check remote CAS only after local distfiles
Diffstat (limited to 'src')
-rw-r--r-- | src/other_tools/ops_maps/content_cas_map.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/other_tools/ops_maps/content_cas_map.cpp b/src/other_tools/ops_maps/content_cas_map.cpp index 01a7f484..da37df4d 100644 --- a/src/other_tools/ops_maps/content_cas_map.cpp +++ b/src/other_tools/ops_maps/content_cas_map.cpp @@ -66,16 +66,6 @@ auto CreateContentCASMap(JustMR::PathsPtr const& just_mr_paths, return; } JustMRProgress::Instance().TaskTracker().Start(key.origin); - // check if content is in remote CAS, if a remote is given - if (remote_api and local_api and remote_api->IsAvailable(digest) and - remote_api->RetrieveToCas( - {Artifact::ObjectInfo{.digest = digest, - .type = ObjectType::File}}, - local_api)) { - JustMRProgress::Instance().TaskTracker().Stop(key.origin); - (*setter)(true); - return; - } // add distfile to CAS auto repo_distfile = (key.distfile @@ -88,6 +78,16 @@ auto CreateContentCASMap(JustMR::PathsPtr const& just_mr_paths, (*setter)(true); return; } + // check if content is in remote CAS, if a remote is given + if (remote_api and local_api and remote_api->IsAvailable(digest) and + remote_api->RetrieveToCas( + {Artifact::ObjectInfo{.digest = digest, + .type = ObjectType::File}}, + local_api)) { + JustMRProgress::Instance().TaskTracker().Stop(key.origin); + (*setter)(true); + return; + } // archive needs fetching // before any network fetching, check that mandatory fields are provided if (key.fetch_url.empty()) { |