diff mbox series

[Unstable/Noble,2/2] UBUNTU: [Packaging] Build linux-source package only for the main kernel

Message ID 20240207112446.1986592-3-juerg.haefliger@canonical.com
State New
Headers show
Series Don't produce linux-*-source-<version> package (LP: #2052439) | expand

Commit Message

Juerg Haefliger Feb. 7, 2024, 11:24 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/2052439

The linux-source package only makes sense for the main linux kernel.
Building it for derivatives is useless and just confuses users. By
default it is enabled globally in 0-common-vars.mk so make sure it is
turned off afterwards for non-linux source packages.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
---
 debian/rules | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/debian/rules b/debian/rules
index eee65f1ea19e..123bdf6a3ecc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -55,6 +55,13 @@  ifeq ($(src_pkg_name),linux)
 	do_tools_host = true
 endif
 
+# The linux-source package may only be built for the linux source package
+# We need to explicitly turn this off here to override any (incorrect)
+# statement in any of the above included makefile snippets
+ifneq ($(src_pkg_name),linux)
+	do_source_package = false
+endif
+
 # Default settings for DKMS modules.
 $(foreach _m,$(all_dkms_modules), \
   $(eval do_$(_m) ?= $(if $(filter $(_m),$(filter-out $(dkms_exclude),$(dkms_include) $(subst any,$(_m),$(subst $(arch),$(_m),$(dkms_$(_m)_archs))))),true,false)) \