diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-02-19 11:33:32 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-02-20 15:33:51 +0100 |
commit | 377b216dea73254f8d8e37868484be69a746678a (patch) | |
tree | 7b8fab9501393f8398d2586cedc07c8f928c6624 | |
parent | 8b4dbd31cc55e15a364f568ec2aec3d856b1bebe (diff) | |
download | justbuild-377b216dea73254f8d8e37868484be69a746678a.tar.gz |
just-import-git: Fix missing inherited pragmas
Update CHANGELOG accordingly.
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rwxr-xr-x | bin/just-import-git.py | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index cc05f53c..7af4dd5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ A feature release on top of `1.4.0`, backwards compatible. ### Fixes +- `just-import-git` now correctly inherits pragmas for imported + file-type repositories during description rewrite. - `just-mr` repository garbage collection now properly removes no longer needed directories. - The "generic" rule now properly detects staging conflicts. diff --git a/bin/just-import-git.py b/bin/just-import-git.py index 4a070445..b75deb5c 100755 --- a/bin/just-import-git.py +++ b/bin/just-import-git.py @@ -268,9 +268,18 @@ def rewrite_repo(repo_spec: Json, repo = assign[repo] elif repo.get("type") == "file": changes = {} + # take subdir subdir: str = os.path.normpath(repo.get("path", ".")) if subdir != ".": changes["subdir"] = subdir + # keep ignore special and absent pragmas + pragma = {} + if cast(Json, repo).get("pragma", {}).get("special", None) == "ignore": + pragma["special"] = "ignore" + if cast(Json, repo).get("pragma", {}).get("absent", False): + pragma["absent"] = True + if pragma: + changes["pragma"] = pragma repo = dict(remote, **changes) elif repo.get("type") == "distdir": existing_repos: List[str] = repo.get("repositories", []) |