[aws][PATCHv2 1/2] UBUNTU: [debian] support for ship_extras_package=false

Kamal Mostafa kamal at canonical.com
Fri Jan 20 20:55:12 UTC 2017


If optional .mk variable 'ship_extras_package' is explicitly set to false,
then do not construct the linux-image-extra package; instead just log all
of the "extra" modules which were pointlessly built yet won't be shipped.
This feature may be useful for config debugging and for custom kernel
development.

Ignore: yes

Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 debian/rules.d/2-binary-arch.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 8ce1fa8..5552bc2 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -448,6 +448,7 @@ endif
 endif
 
 binary-%: pkgimg = $(bin_pkg_name)-$*
+binary-%: pkgdir_ex = $(CURDIR)/debian/$(extra_pkg_name)-$*
 binary-%: pkgimg_ex = $(extra_pkg_name)-$*
 binary-%: pkghdr = $(hdrs_pkg_name)-$*
 binary-%: dbgpkg = $(bin_pkg_name)-$*-dbgsym
@@ -472,6 +473,14 @@ binary-%: install-%
 	dh_builddeb -p$(pkgimg) -- -Zbzip2 -z9
 
 ifeq ($(do_extras_package),true)
+  ifeq ($(ship_extras_package),false)
+	# If $(ship_extras_package) is explicitly set to false, then do not
+	# construct the linux-image-extra package; instead just log all of the
+	# "extra" modules which were pointlessly built yet won't be shipped.
+	find $(pkgdir_ex) -name '*.ko' | sort \
+		| sed 's|^$(pkgdir_ex)/|NOT-SHIPPED |' \
+		| tee -a $(target_flavour).not-shipped.log;
+  else
 	if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then \
 		dh_installchangelogs -p$(pkgimg_ex); \
 		dh_installdocs -p$(pkgimg_ex); \
@@ -483,6 +492,7 @@ ifeq ($(do_extras_package),true)
 		dh_md5sums -p$(pkgimg_ex); \
 		dh_builddeb -p$(pkgimg_ex) -- -Zbzip2 -z9; \
 	fi
+  endif
 endif
 
 	dh_installchangelogs -p$(pkghdr)
-- 
2.7.4





More information about the kernel-team mailing list