summary refs log tree commit diff
path: root/maintainers/scripts/remove-old-aliases.py
diff options
context:
space:
mode:
Diffstat (limited to 'maintainers/scripts/remove-old-aliases.py')
-rwxr-xr-xmaintainers/scripts/remove-old-aliases.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/maintainers/scripts/remove-old-aliases.py b/maintainers/scripts/remove-old-aliases.py
index 8f04a9be4f1..3c5f8edc50a 100755
--- a/maintainers/scripts/remove-old-aliases.py
+++ b/maintainers/scripts/remove-old-aliases.py
@@ -102,12 +102,13 @@ def convert_to_throw(date_older_list: list[str]) -> list[tuple[str, str]]:
 
         alias = before_equal
         alias_unquoted = before_equal.strip('"')
-        after_equal_list = [x.strip(";:") for x in after_equal.split()]
+        replacement = next(x.strip(";:") for x in after_equal.split())
+        replacement = replacement.removeprefix("pkgs.")
 
         converted = (
-            f"{indent}{alias} = throw \"'{alias_unquoted}' has been renamed to/replaced by"
-            f" '{after_equal_list.pop(0)}'\";"
-            f' # Converted to throw {datetime.today().strftime("%Y-%m-%d")}'
+            f"{indent}{alias} = throw \"'{alias_unquoted}' has been"
+            f" renamed to/replaced by '{replacement}'\";"
+            f" # Converted to throw {datetime.today().strftime('%Y-%m-%d')}"
         )
         converted_list.append((line, converted))