From 408c7be636d247f9131b465fe6e78aa36946ecba Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Fri, 23 Dec 2022 14:23:32 +0100 Subject: 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. --- bin/just-mr.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'bin/just-mr.py') 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): -- cgit v1.2.3