diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-12-23 14:23:32 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-12-23 17:08:12 +0100 |
commit | 408c7be636d247f9131b465fe6e78aa36946ecba (patch) | |
tree | e85a99b479570e064707945d12d75b05985eb7ef /bin | |
parent | 92b19243efea8a758dcb2da67749fb7351a44430 (diff) | |
download | justbuild-408c7be636d247f9131b465fe6e78aa36946ecba.tar.gz |
just-mr: fix distdir computation
just-mr is designed to store everything that can be reported as git
tree entirely in git only. To avoid recomputation, just-mr keeps index
files mapping the description of a repository to the corresponding
git trees. For these index files to be useful, the computation of
the key has to be independent of the presence of the respective
archives in CAS. This will become even more important once garbage
collection will be added. Fix this for distdir repositories.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/just-mr.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/just-mr.py b/bin/just-mr.py index e4671d2c..29af9bb3 100755 --- a/bin/just-mr.py +++ b/bin/just-mr.py @@ -574,7 +574,6 @@ def distdir_checkout(desc, repos): if repo_desc_type in ["archive", "zip"]: # fetch repo content_id = repo_desc["content"] - archive_fetch(repo_desc, content=content_id) # Store the relevant info in the map content[get_distfile(repo_desc)] = content_id @@ -597,6 +596,15 @@ def distdir_checkout(desc, repos): git_root(upstream=None) ] + # As the content is not there already, so we have to ensure the archives + # are present. + for repo in distdir_repos: + repo_desc = repos[repo].get("repository", {}) + repo_desc_type = repo_desc.get("type") + if repo_desc_type in ["archive", "zip"]: + content_id = repo_desc["content"] + archive_fetch(repo_desc, content=content_id) + # Create the dirstdir repo folder content target_tmp_dir = distdir_tmp_dir(distdir_content_id) if os.path.exists(target_tmp_dir): |