diff mbox series

[Unstable/Noble,2/2] UBUNTU: [packaging] do not parse removed debian.*/rules.d/hooks.mk

Message ID 20240301082553.1138917-3-masahiro.yamada@canonical.com
State New
Headers show
Series Fix annotation mismatch when bash is used (plan-A: keep arch-has-odm-enabled.sh) | expand

Commit Message

Masahiro Yamada March 1, 2024, 8:25 a.m. UTC
Commit "UBUNTU: [Packaging] Remove do_enforce_all variable" removed
debian.master/rules.d/hooks.mk.

Since then, debian/scripts/misc/arch-has-odm-enabled.sh, if executed
directly, emits the following error:

  $ 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

This is harmless because the error in a piped command is ignored,
and people are not even aware of it because stderr from this script
is suppressed by default.

Just a trivial cleanup.

Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com>
---

 debian/scripts/misc/arch-has-odm-enabled.sh | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/debian/scripts/misc/arch-has-odm-enabled.sh b/debian/scripts/misc/arch-has-odm-enabled.sh
index b71e55620963..d18611cdf923 100755
--- a/debian/scripts/misc/arch-has-odm-enabled.sh
+++ b/debian/scripts/misc/arch-has-odm-enabled.sh
@@ -13,12 +13,9 @@  fi
 
 TOPDIR=$(dirname $0)/../../..
 . $TOPDIR/debian/debian.env
-RULESDIR=$TOPDIR/$DEBIAN/rules.d
 
 do_odm_drivers=false
-for f in $ARCH.mk hooks.mk; do
-	eval $(cat $RULESDIR/$f | sed -n -e '/do_odm_drivers/s/ \+//gp')
-done
+eval $(cat "$TOPDIR/$DEBIAN/rules.d/$ARCH.mk" | sed -n -e '/do_odm_drivers/s/ \+//gp')
 if [ "$do_odm_drivers" != "true" ]; then
 	exit 1
 fi