Commit 773ead84 authored by Kamal Mostafa's avatar Kamal Mostafa Committed by Juerg Haefliger

UBUNTU: [debian] support for ship_extras_package=false

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.

BugLink: http://bugs.launchpad.net/bugs/1764794Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
Acked-by: default avatarTim Gardner <tim.gardner@canonical.com>
Acked-by: default avatarBrad Figg <brad.figg@canonical.com>

(cherry-picked from commit f16de3c17fcbbcf01c81f2897e4b8fe4a5ca470c bionic)
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 1a12f432
......@@ -450,6 +450,7 @@ endif
binary-%: pkgimg = $(bin_pkg_name)-$*
binary-%: pkgimg_mods = $(mods_pkg_name)-$*
binary-%: pkgimg_ex = $(mods_extra_pkg_name)-$*
binary-%: pkgdir_ex = $(CURDIR)/debian/$(mods_extra_pkg_name)-$*
binary-%: pkghdr = $(hdrs_pkg_name)-$*
binary-%: dbgpkg = $(bin_pkg_name)-$*-dbgsym
binary-%: dbgpkgdir = $(CURDIR)/debian/$(bin_pkg_name)-$*-dbgsym
......@@ -483,6 +484,14 @@ binary-%: install-%
dh_builddeb -p$(pkgimg_mods)
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); \
......@@ -494,6 +503,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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment