diff mbox series

[Unstable,3/3] UBUNTU: [Packaging] final-checks: Handle unversioned ABI directories

Message ID 20210412125358.23098-4-juergh@canonical.com
State New
Headers show
Series debian: Drop versioned ABI directory names | expand

Commit Message

Juerg Haefliger April 12, 2021, 12:53 p.m. UTC
The ABI directory name is no longer versioned and the ABI version is now
stored in a file in the ABI directory. Check that that file exists and
contains the expected value.

Signed-off-by: Juerg Haefliger <juergh@canonical.com>
---
 debian/scripts/misc/final-checks | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/debian/scripts/misc/final-checks b/debian/scripts/misc/final-checks
index 9532716c7ba1..a20e0a0f96ff 100755
--- a/debian/scripts/misc/final-checks
+++ b/debian/scripts/misc/final-checks
@@ -44,6 +44,18 @@  abi_check()
 	fi
 }
 
+abi_version="$debian/abi/previous/version"
+if ! [ -f "$abi_version" ]
+then
+	failure "$abi_version ABI version file missing"
+fi
+
+version=$(cat "$abi_version")
+if [ "$abi" != "$version" ]
+then
+	failure "$abi_version ABI version mismatch ($abi != $version)"
+fi
+
 for arch in $archs
 do
 	image_pkg=$(awk -F '\\s*=\\s*' '$1 == "do_flavour_image_package" { print $2 }' $debian/rules.d/$arch.mk)
@@ -61,7 +73,7 @@  do
 	for flavour in $flavours
 	do
 		flavour=$(echo "$flavour" | sed -e 's@.*/config.flavour.@@')
-		abi_check "$debian/abi/$abi" "$arch" "$flavour"
+		abi_check "$debian/abi/previous" "$arch" "$flavour"
 	done
 done