Fix unknown repo error with mtree_mutate and Bzlmod (#948)

With Bzlmod, every repo has its own namespace. Using Label() should make sure it uses the namespace of the .bzl file instead of the caller's one.
This commit is contained in:
Marcel 2024-10-04 17:41:24 +02:00 committed by GitHub
parent 1b4d9a7f04
commit ca80d07fca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

2
docs/tar.md generated
View File

@ -119,7 +119,7 @@ Modify metadata in an mtree file.
| <a id="mtree_mutate-mtime"></a>mtime | new modification time for all entries. | `None` |
| <a id="mtree_mutate-owner"></a>owner | new uid for all entries. | `None` |
| <a id="mtree_mutate-ownername"></a>ownername | new uname for all entries. | `None` |
| <a id="mtree_mutate-awk_script"></a>awk_script | may be overridden to change the script containing the modification logic. | `"@aspect_bazel_lib//lib/private:modify_mtree.awk"` |
| <a id="mtree_mutate-awk_script"></a>awk_script | may be overridden to change the script containing the modification logic. | `Label("@aspect_bazel_lib//lib/private:modify_mtree.awk")` |
| <a id="mtree_mutate-kwargs"></a>kwargs | additional named parameters to genrule | none |

View File

@ -142,7 +142,7 @@ def mtree_mutate(
mtime = None,
owner = None,
ownername = None,
awk_script = "@aspect_bazel_lib//lib/private:modify_mtree.awk",
awk_script = Label("@aspect_bazel_lib//lib/private:modify_mtree.awk"),
**kwargs):
"""Modify metadata in an mtree file.