]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
UBUNTU: [debian] support for ship_extras_package=false
authorKamal Mostafa <kamal@canonical.com>
Wed, 13 Dec 2017 19:43:14 +0000 (11:43 -0800)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 29 Jan 2018 13:45:06 +0000 (07:45 -0600)
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@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
debian/rules.d/2-binary-arch.mk

index b3e97ae0cd5776dc416930b79bea4d0acbdd7509..b39eacf992529c033f7ec65851c42df432809aa5 100644 (file)
@@ -453,6 +453,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
@@ -477,6 +478,14 @@ binary-%: install-%
        dh_builddeb -p$(pkgimg)
 
 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); \
@@ -488,6 +497,7 @@ ifeq ($(do_extras_package),true)
                dh_md5sums -p$(pkgimg_ex); \
                dh_builddeb -p$(pkgimg_ex); \
        fi
+  endif
 endif
 
        dh_installchangelogs -p$(pkghdr)