summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2022-12-23 14:23:32 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2022-12-23 17:08:12 +0100
commit408c7be636d247f9131b465fe6e78aa36946ecba (patch)
treee85a99b479570e064707945d12d75b05985eb7ef /bin
parent92b19243efea8a758dcb2da67749fb7351a44430 (diff)
downloadjustbuild-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-xbin/just-mr.py10
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):