diff mbox series

[SRU,U/L,2/2] UBUNTU: [Packaging] checks/final-checks: Honor 'do_skip_checks'

Message ID 20230327071233.420471-3-juerg.haefliger@canonical.com
State New
Headers show
Series checks: Move final-checks script and honor do_skip_checks | expand

Commit Message

Juerg Haefliger March 27, 2023, 7:12 a.m. UTC
The final-checks script is doing some final ABI checkig that should be
skipped if 'do_skip_checks' is true. Just like the other checker scripts
in debian/scripts/checks.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
---
 debian/rules.d/1-maintainer.mk     |  2 +-
 debian/scripts/checks/final-checks | 10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk
index bd2ca56c6e61..724a71c5dba1 100644
--- a/debian/rules.d/1-maintainer.mk
+++ b/debian/rules.d/1-maintainer.mk
@@ -151,7 +151,7 @@  finalchecks: debian/control
 ifeq ($(do_fips_checks),true)
 	$(DROOT)/scripts/misc/fips-checks
 endif
-	$(DROOT)/scripts/checks/final-checks "$(DEBIAN)" "$(prev_fullver)"
+	$(DROOT)/scripts/checks/final-checks "$(DEBIAN)" "$(prev_fullver)" $(do_skip_checks)
 
 .PHONY: startnewrelease
 startnewrelease:
diff --git a/debian/scripts/checks/final-checks b/debian/scripts/checks/final-checks
index 5371057663a3..5d283e3c4c6a 100755
--- a/debian/scripts/checks/final-checks
+++ b/debian/scripts/checks/final-checks
@@ -3,6 +3,12 @@ 
 debian="$1"
 abi="$2"
 
+skipabi=${3:-}
+case "${skipabi,,}" in
+    1|true|yes) skipabi=true ;;
+    *) skipabi=false ;;
+esac
+
 archs=$(awk '/^Architecture:/ { $1=""; for (i=1; i<=NF; i++) { if ($i != "all") { print $i }}}' debian/control | sort -u)
 
 fail=0
@@ -100,7 +106,9 @@  do
 				fi
 			fi
 		fi
-		abi_check "$debian/abi" "$arch" "$flavour"
+		if [ "${skipabi}" = "false" ] ; then
+			abi_check "$debian/abi" "$arch" "$flavour"
+		fi
 	done
 done