From d0cf3a8354669429ccb08cf409c453955bcc5a32 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 1 Mar 2024 18:16:35 +0900 Subject: [PATCH] UBUNTU: [Packaging][realtime] remove debian/scripts/misc/arch-has-odm-enabled.sh On Ubuntu, /bin/sh is a symlink to /bin/dash by default. While this is a rare use case, when /bin/sh is a symlink to /bin/bash, the annotation check fails due to a mismatch of CONFIG_UBUNTU_ODM_DRIVERS. debian/scripts/misc/arch-has-odm-enabled.sh always fails with bash. You can see it if you directly execute it. [with dash] $ dash debian/scripts/misc/arch-has-odm-enabled.sh amd64 cat: debian/scripts/misc/../../../debian.master/rules.d/hooks.mk: No such file or directory $ echo $? 0 [with bash] $ bash debian/scripts/misc/arch-has-odm-enabled.sh amd64 cat: debian/scripts/misc/../../../debian.master/rules.d/hooks.mk: No such file or directory debian/scripts/misc/arch-has-odm-enabled.sh: line 26: return: can only `return' from a function or sourced script $ echo $? 2 Bash provides stricter checks, hence the 'return' statement outside a function leads to an error. While it is trivial to fix, I wonder if we need this script in the first place. Its purpose is to make CONFIG_UBUNTU_ODM_DRIVERS a user-unconfigurable option. Given debian.*/config/annotations specifying the CONFIG set for each arch/flavour, why not handle CONFIG_UBUNTU_ODM_DRIVERS just like other normal CONFIG options? Users are still allow to toggle it from menuconfig etc., but I do not see a significant issue, as any trouble comes to users' responsibility when they change CONFIG options by themselves. Signed-off-by: Masahiro Yamada Signed-off-by: Andrea Righi Signed-off-by: Joseph Salisbury --- debian.realtime/rules.d/amd64.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/debian.realtime/rules.d/amd64.mk b/debian.realtime/rules.d/amd64.mk index d3b00514edab..e7b29c28d175 100644 --- a/debian.realtime/rules.d/amd64.mk +++ b/debian.realtime/rules.d/amd64.mk @@ -18,5 +18,4 @@ do_tools_hyperv = true do_tools_host = false do_extras_package = true do_tools_acpidbg = true -do_odm_drivers = true do_lib_rust = false