[PATCH] scripts: generate_rust_analyzer: fix pin-init name in kernel deps
From: Lalaev, Andrei
Date: Mon Mar 31 2025 - 02:18:11 EST
Because of different crate names ("pin-init" and "pin_init") passed to
"append_crate" and "append_crate_with_generated", the script fails with
"KeyError: 'pin-init'".
To overcome the issue, pass the same name to both functions.
Signed-off-by: Andrei Lalaev <andrei.lalaev@xxxxxxxxxxxxxx>
---
P.S. I can't use `git-send-email`, so I hope, that the formatting
is not destroyed by Outlook client.
scripts/generate_rust_analyzer.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index b0d7dc1e9267..cd41bc906fbd 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -133,7 +133,7 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs):
append_crate_with_generated("bindings", ["core"])
append_crate_with_generated("uapi", ["core"])
- append_crate_with_generated("kernel", ["core", "macros", "build_error", "pin-init", "bindings", "uapi"])
+ append_crate_with_generated("kernel", ["core", "macros", "build_error", "pin_init", "bindings", "uapi"])
def is_root_crate(build_file, target):
try:
--
2.34.1