[Unstable/Mantic][PATCH 2/3] UBUNTU: [Packaging] checks/final-checks: check existance of Makefile first

Juerg Haefliger juerg.haefliger at canonical.com
Tue Jul 4 08:25:39 UTC 2023


Check that the per-arch Makefile exists before trying to read it.

Signed-off-by: Juerg Haefliger <juerg.haefliger at canonical.com>
---
 debian/scripts/checks/final-checks | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/debian/scripts/checks/final-checks b/debian/scripts/checks/final-checks
index 5581bb644a14..2c03c47d0321 100755
--- a/debian/scripts/checks/final-checks
+++ b/debian/scripts/checks/final-checks
@@ -63,13 +63,15 @@ fi
 
 for arch in $archs
 do
-	image_pkg=$(awk -F '\\s*=\\s*' '$1 == "do_flavour_image_package" { print $2 }' $debian/rules.d/$arch.mk)
-	if [ "$image_pkg" = "false" ]; then
+	if [ ! -f "$debian/rules.d/$arch.mk" ]; then
 		continue
 	fi
-	if [ ! -f "$debian/rules.d/$arch.mk" ]; then
+
+	image_pkg=$(awk -F '\\s*=\\s*' '$1 == "do_flavour_image_package" { print $2 }' $debian/rules.d/$arch.mk)
+	if [ "$image_pkg" = "false" ]; then
 		continue
 	fi
+
 	flavours=$(
 		awk '/^\s*flavours\s*=/{
 			sub(/^\s*flavours\s*=\s*/, "");
-- 
2.39.2




More information about the kernel-team mailing list