[PATCH F/Unstable] UBUNTU: [Packaging] final-checks: Depend on makefile flavours

Stefan Bader stefan.bader at canonical.com
Mon Feb 17 11:31:13 UTC 2020


The available ABI files do not depend on the config flavours but
those actually built. So instead of looking at the config files,
parse the flavours variable of the <arch>.mk files.

This handles the case where we would like to drop certain flavours
or even whole architectures in backport kernels. Removing the
configuration file is bad because that would cause a huge delta
everytime we rebase (a local mangle would to remove the config
file each time and then the next updateconfigs would re-arrange
things based on that).

Instead we can rely on the information in the architecture
specific rules.

Ignore: yes
Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
---

We have this in some hwe branches but it would be good to queue
it up for devel, so we do not have to constantly put it back when
we run into that case of dropping stuff.

-Stefan

 debian/scripts/misc/final-checks | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/debian/scripts/misc/final-checks b/debian/scripts/misc/final-checks
index 4b1afa76b821..df3cd308c36f 100755
--- a/debian/scripts/misc/final-checks
+++ b/debian/scripts/misc/final-checks
@@ -51,8 +51,15 @@ do
 	if [ "$image_pkg" = "false" ]; then
 		continue
 	fi
-
-	for flavour in $(ls -1 "$debian/config/$arch/config.flavour."*)
+	if [ ! -f "$debian/rules.d/$arch.mk" ]; then
+		continue
+	fi
+	flavours=$(
+		awk '/^\s*flavours\s*=/{
+			sub(/^\s*flavours\s*=\s*/, "");
+			print
+		}' "$debian/rules.d/$arch.mk")
+	for flavour in $flavours
 	do
 		flavour=$(echo "$flavour" | sed -e 's at .*/config.flavour.@@')
 		abi_check "$debian/abi/$abi" "$arch" "$flavour"
-- 
2.17.1




More information about the kernel-team mailing list