osbase/build: replace label_keyed_string_dict with string_keyed_label_dict
Before bazel 7.4 the string_keyed_label_dict attribute type wasn't available. fsspec_core_impl was using a label_keyed_string_dict which is structurally wrong but there was no alternative for it. This replaces that usage.
Change-Id: I36c02c84e6aa2557cd2beb09c07d3ceca501553d
Reviewed-on: https://review.monogon.dev/c/monogon/+/3853
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
Tested-by: Jenkins CI
diff --git a/osbase/build/def.bzl b/osbase/build/def.bzl
index 73752f7..d4b497c 100644
--- a/osbase/build/def.bzl
+++ b/osbase/build/def.bzl
@@ -61,7 +61,7 @@
fs_files = []
inputs = []
- for label, p in ctx.attr.files.items() + ctx.attr.files_cc.items() + extra_files:
+ for p, label in ctx.attr.files.items() + ctx.attr.files_cc.items() + extra_files:
if not p.startswith("/"):
fail("file {} invalid: must begin with /".format(p))
@@ -134,7 +134,7 @@
their permissions set to 0444. All parent directories will be created with 0755 permissions.
""",
attrs = {
- "files": attr.label_keyed_string_dict(
+ "files": attr.string_keyed_label_dict(
mandatory = True,
allow_files = True,
doc = """
@@ -144,7 +144,7 @@
# Attach pure transition to ensure all binaries added to the initramfs are pure/static binaries.
cfg = build_pure_transition,
),
- "files_cc": attr.label_keyed_string_dict(
+ "files_cc": attr.string_keyed_label_dict(
allow_files = True,
doc = """
Special case of 'files' for compilation targets that need to be built with the musl toolchain like
@@ -196,7 +196,7 @@
their permissions set to 0444. All parent directories will be created with 0555 permissions.
""",
attrs = {
- "files": attr.label_keyed_string_dict(
+ "files": attr.string_keyed_label_dict(
mandatory = True,
allow_files = True,
doc = """
@@ -206,7 +206,7 @@
# Attach pure transition to ensure all binaries added to the initramfs are pure/static binaries.
cfg = build_pure_transition,
),
- "files_cc": attr.label_keyed_string_dict(
+ "files_cc": attr.string_keyed_label_dict(
allow_files = True,
doc = """
Special case of 'files' for compilation targets that need to be built with the musl toolchain like